Skip to content

Instantly share code, notes, and snippets.

@solomon081
Created March 31, 2012 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solomon081/2267246 to your computer and use it in GitHub Desktop.
Save solomon081/2267246 to your computer and use it in GitHub Desktop.
Show RegExp
def show(a, re)
if a =~ re
puts "#{$`}>>#{$&}<<#{$'}"
else
puts "No Match Found"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment