Regular Expressions 101

Spon⁠sors

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

/
1?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})
/

Description
Created·2021-09-17 16:48
Type·Substitution
Flavor·PCRE2 (PHP)

Format phone numbers to look nice!

E.g. 12345678900 --> +1(234)-567-8900 Matches with most ways numbers are stored 1.234.567.8900 1 234 567 8900 Mix and match

Submitted by Mendel Groner
Open Workspace