Skip to content

Instantly share code, notes, and snippets.

@devver
Created January 4, 2010 02:38
Show Gist options
  • Save devver/268254 to your computer and use it in GitHub Desktop.
Save devver/268254 to your computer and use it in GitHub Desktop.
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