Created
May 14, 2013 22:36
-
-
Save lilliealbert/5580236 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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