I have a line:
"hello\t World\nbla"
I would like to break it into:
["hello\t ", "World\n", "bla"]
How can I do this in Ruby?
>> "hello\t World\nbla".scan /\S+\s*/ => ["hello\t ", "World\n", "bla"]
Hope this helps ...
>> "hello\t World\nbla".scan(/\w+\s*/) => ["hello\t ", "World\n", "bla"]