Skip to content

Instantly share code, notes, and snippets.

@robesris
Created May 16, 2014 16:58
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 robesris/a64b8f627abee4550346 to your computer and use it in GitHub Desktop.
Save robesris/a64b8f627abee4550346 to your computer and use it in GitHub Desktop.
2.0.0-p451 :001 > something = "abcdefghijk"
=> "abcdefghijk"
2.0.0-p451 :002 > a=something.sub(/(def)(.*)i/,"#{$1}#{$2}")
=> "abcjk"
2.0.0-p451 :003 > b=something.sub(/(def)(.*)i/,"#{$1}#{$2}")
=> "abcdefghjk"
2.0.0-p451 :004 > a==b
=> false
2.0.0-p451 :005 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment