Regular Expressions 101

Community Patterns

PSMFC-ELogUserRegex

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(^[A-Za-z][A-Za-z0-9\.\-\_]+$)|(^[\w\-\.\+]+@([\w-]+\.)+[\w-]{2,4}$)
/
gm

Description

allow simple usernames starting with a letter, containing . - and _ or an email

Submitted by anonymous - a year ago