Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?=.*[0-9])(?=.*[a-zA-Z]).*
/
gm

Description

At least one character and one digit, ignoring the order in which they appear.

Submitted by Loïc [TwystO] Liné - 6 years ago