Skip to content

Instantly share code, notes, and snippets.

@releu
Created March 6, 2012 20:20
Show Gist options
  • Save releu/1988744 to your computer and use it in GitHub Desktop.
Save releu/1988744 to your computer and use it in GitHub Desktop.
wtf?
>> a
=> "Something like this\n\n<div class=\"gistable\" data-gist-at=\"1988392\"></div>\n\n#ruby #fiber"
>> a.split(' ')
=> ["Something", "like", "this", "<div", "class=\"gistable\"", "data-gist-at=\"1988392\"></div>", "#ruby", "#fiber"]
>> a.split(/ /)
=> ["Something", "like", "this\n\n<div", "class=\"gistable\"", "data-gist-at=\"1988392\"></div>\n\n#ruby", "#fiber"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment