Created
January 4, 2010 02:38
-
-
Save devver/268254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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