Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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