Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 9 lines (8 sloc) 0.18 kb
1 2 3 4 5 6 7 8
---
gsub: |-
  >> "dog cat".gsub(/(dog) cat/, "cat")
  => "cat"
  >> "dog cat".gsub(/(dog) cat/, '\1')
  => "dog"
  >> "20 dogs".gsub(/\d+/) { |num| num.to_i + 1 }
  => "21 dogs"
Something went wrong with that request. Please try again.