Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(([0-9]{3})\.?([0-9]{3})\.?([0-9]{3})\-?([0-9]{2})([-])?)$
/

Description

Match 1: 123.465.789-00 Group 1: 123.465.789-00 Group 2: 123 Group 3: 456 Group 4: 789 Group 5: 00

Submitted by BAWB.io - 2 years ago