Regular Expressions 101

Community Library

Community Library Entry

2

Regular ExpressionOpen Workspace

/
(\+?(\b1)?[\ .\/-]?((?(2)|(\b))|(\())\d{3}(?(?<=\(\d{3})\)|)[\ .\/-]?)?(?(1)|\b)\d{3}[\ .\/-]?\d{4}[\ ]?([xX][\ ]?\d{1,5})?\b
/
gm

Description
Created·2021-07-03 04:46
Type·Match
Flavor·PCRE2 (PHP)

US phone number, try to catch as many as possible

Submitted by Anonymous
Open Workspace