Regular Expressions 101

Community Library

Community Library Entry

2

Regular ExpressionOpen Workspace

/
\+?(\d{1,2})?[ .-]?\(?(\d{3})\)?[ .-]?(\d{3})[ .-]?(\d{4})
/
gm

Description
Created·2023-07-11 02:52
Updated·2026-01-13 23:24
Type·Match
Flavor·PCRE2 (PHP)

Just a simple regex to detect phone numbers Should work in just about any regex flavor.

Submitted by User9684
Open Workspace