Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-09-04 18:25
Updated·2021-09-04 18:26
Flavor·Python

r"
^[ ]*(?:(?:\+)?1)?[ ]*(\()?(?:[2-9][0-9]{2})(?(1)\))[ ]*(?:-|\.)?[ ]*(?:[2-9][0-9]{2})[ ]*(?:-|\.)?[ ]*[0-9]{4}[ ]*$
"
gm
Open regex in editor

Description

Submitted by Nishant Misra