Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}(:)\d+$
/

Description

Done while modifying Remote MX Wizard( Getting MX records from user input)

Submitted by Levyb - 8 years ago