Title |
Test
Find
US Phone Number - Normalization
|
Expression |
^([\.\"\'-/ \(/)\s\[\]\\\,\<\>\;\:\{\}]?)([0-9]{3})([\.\"\'-/\(/)\s\[\]\\\,\<\>\;\:\{\}]?)([0-9]{3})([\,\.\"\'-/\(/)\s\[\]\\\<\>\;\:\{\}]?)([0-9]{4})$ |
Description |
This RE recognizes unformatted US phone numbers. The replacement string is $2-$4-$6. Helps when you want to normalize the phone numbers in a DB field.This also identifies a single space given before are after the part of first, second 3 digits and before the last 4 digits. The replaced format will be "123-456-7890" |
Matches |
(123)-123/2345 1234567890 123-123-2345 123/234\8976 333.334,3456 |
Non-Matches |
(1234567890 jdfojsdoj) ( 3456789098) (sdfhdih 675-576-9087) |
Author |
Rating:
Mukundh
|
Source |
own |
Your Rating |
|