Regular Expressions 101

Phone number extract

Open Workspace
  • Python
  • Match
0

Regular Expression

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