Skip to content

Instantly share code, notes, and snippets.



Created Jan 4, 2010
What would you like to do?
puts "abc".gsub(/a(b)c/) {$1+$1} # bb
puts "abc".gsub(/a(b)c/) { $&+$&} # abcabc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.