Regular Expressions 101

Community Patterns

Phone number extract

0

Regular Expression
Python

r"
Phone:\s*\({0,1}(\d{3})\){0,1}\s*(\d{3})-*(\d{4})\n{0,1}
"
g

Description

Used to get the phone number from a list of phone numbers

Submitted by jmitz - 8 years ago