Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2017-01-17 12:37
Flavor·Python

r"
\(*(\d{3})(?:(?:-*|\s*|\.*|\)*|\)\s*))(\d{3})(?:(?:-*|\s*|\.*|\)*))(\d{4})
"
g
Open regex in editor

Description

Spamlord assignment: this regex detects phone numbers in text.

Submitted by anonymous