Regex Expressions

Here are some of the regex expressions that I’ve found useful. The first is just for US phone numbers. I’ve modified one that I found so that it is a little more restrictive, specifically not allowing zeros or ones for the first digit of the area code or the central office code.


Here’s how to format it:



I’ve also used for testing and decoding them.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.