Skip to content

Instantly share code, notes, and snippets.

@lilliealbert
Created May 14, 2013 22:36
Show Gist options
  • Save lilliealbert/5580236 to your computer and use it in GitHub Desktop.
Save lilliealbert/5580236 to your computer and use it in GitHub Desktop.
THINGS FOR LATER
* How do reg ex match groups work? What's with the non-interpolation interpolation? Why does the match group need to be in a string?
A la:
def hide_all_ssns(string)
string.gsub(/(\d{3})-(\d{2})-(\d{4})/, 'XXX-XX-\3' )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment