Skip to content

Instantly share code, notes, and snippets.

@klebershimabuku
Created June 5, 2012 02:13
Show Gist options
  • Save klebershimabuku/2872088 to your computer and use it in GitHub Desktop.
Save klebershimabuku/2872088 to your computer and use it in GitHub Desktop.
1.9.2p318 :001 > str = "google-com, Awesome-net(Ooops), facebook-com / rocket-yet"
=> "google-com, Awesome-net(Ooops), facebook-com / rocket-yet"
1.9.2p318 :002 > str.match(/(\w+-com)/)
=> #<MatchData "google-com" 1:"google-com">
1.9.2p318 :003 >
1.9.3p125 :001 > str = "google-com, Awesome-net(Ooops), facebook-com / rocket-yet"
=> "google-com, Awesome-net(Ooops), facebook-com / rocket-yet"
1.9.3p125 :002 > str.match(/(\w+-com)/)
=> #<MatchData "google-com" 1:"google-com">
1.9.3p125 :003 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment