Created
June 7, 2016 06:31
-
-
Save pvin/e72c0d8e6bb1dc1d6235008e261c808c to your computer and use it in GitHub Desktop.
Ruby sub - gsub
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 'yes yes'.sub( 'yes', 'no' ) | |
=> no yes | |
puts 'yes yes'.gsub( 'yes', 'no' ) | |
=> no no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment