Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-05-03 19:27
Flavor·PCRE2 (PHP)

/
^\+597[78]\d{6}$
/
gm
Open regex in editor

Description

So the regular expression ensures that the phone number starts with "+597", followed by either a 7 or 8, and then six more digits. This will match all three phone numbers you provided as examples.

Submitted by Kenny