The Now Platform® Washington DC release is live. Watch now!
Yesterday I showed you how this regular expression (regex) worked to find SSNs in text:
/(^|[^0-9])([0-9]{3}-[0-9]{2}-[0-9]{4})($|[^0-9])/m
/(^|\D)(\d{3}-\d{2}-\d{4})($|\D)/m
/(^|\D)(\d\d\d-\d\d-\d\d\d\d)($|\D)/m
0: '(123-45-6789)' // the entire matched text
1: '(' // capture group 1
2: '123-45-6789' // capture group 2
3: ')' // capture group 3
/(?:^|\D)(\d{3}-\d{2}-\d{4})(?:$|\D)/m
0: '(123-45-6789)'
1: '123-45-6789'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.