Regular Expression of the day

(?!(([1,2,3,4,5,6,8,9,0])\2{9}))(?!((1234567890|0987654321)))(((\+?\d{1,2}[\s.-])?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4})|(\d{10,}))

Match generic US phone numbers. Ignore 1-9 repeating (ie: 4444444444, 1111111111, (except 7, we want 7777777777 for testing)). Allow for spaces, no spaces, dashes, or period delimiters.

Of course we _should_ use a standard phone number regex, but of course this project calls for something unique.

RegEx is weird, but fun.

Did you like this post? Let me know by sending me a message. Is there a topic you would like me to cover? Let me know about that too. I look forward to hearing from you!

Let's Connect!