I'm trying to troubleshoot why Ruby isn't splitting my string by empty spaces. For example:
[1] pry(#<irb>)> msg
=> "!iex <http://test-domain.com.au|test-domain.com.au> <mailto:first.last@test-domain.com.au|first.last@test-domain.com.au> FirstName"
[2] pry(#<irb>)> msg.split(" ")
=> ["!iex <http://test-domain.com.au|test-domain.com.au> <mailto:first.last@test-domain.com.au|first.last@test-domain.com.au> FirstName"]
[3] pry(#<irb>)> msg.include? " "
=> false
[8] pry(#<irb>)> msg.inspect
=> ""!iex <http://test-domain.com.au|test-domain.com.au> <mailto:first.last@test-domain.com.au|first.last@test-domain.com.au> FirstName""
[9] pry(#<irb>)>
As you can see above, my string appears to contain spaces, but the split
method isn't working on it. I tried to run inspect
on the string just to see if something else was being displayed, but it doesn't really make a lot of sense to me.
Any help would be greatly appreciated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…