Regex for phone numbers (US-style)
Example pattern below—edit it or paste your own. All processing runs in your browser. For Python’s re module, switch flavor in the tool.
Standard `RegExp` for explanation and preview.
Plain-English explanation
Flavor: JavaScript RegExp
Flags: g (find all matches)
a word boundary Then Match (non-capturing): Match the character "+", optional. Then Match the character "1". Then Match one character from: the character "-", the character ".", whitespace character, optional, optional. Then Match the character "(", optional. Then Match digit character (0–9), repeated exactly 3 times. Then Match the character ")", optional. Then Match one character from: the character "-", the character ".", whitespace character, optional. Then Match digit character (0–9), repeated exactly 3 times. Then Match one character from: the character "-", the character ".", whitespace character, optional. Then Match digit character (0–9), repeated exactly 4 times. Then a word boundary