Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
\(??(?P<area>0\d{1,2}?)\)??(\s*?|\-??)(?P<phone>\d{3,4}(\s*?|\-??)\d{3,4})
"

Description

If pattern match, then this number probably is a phone number in Taiwan.

Submitted by Assalin - 10 years ago