I’m still at the point where I can use stuff like **^\d{3}[- | ]?\d{2}[- | ]?\d{4}$** and not fully understand the pieces. So i’m always looking for decent RegEx tools. Eric Gunnerson had a good post about suing RegEx to validate a SSN |
But first, a word about tools. It’s a lot easier to use a tool to do this sort of thing than it is to write code to do it. So, I suggest one of the following
</p>
The Regulator. No fair to use the library if you choose this tool. Uses a bit of code I wrote to analyze regex for you.
Regular Expression Workbench (classic) . I wrote this
Regular Expression Workbench (updated). Version with a different UI on it.