Regular Expressions 101

Community Patterns

No trailing spaces or extra spaces max char 200 min 2 and hyphen and & only allowed

1

Regular Expression
PCRE (PHP <7.3)

/
^(?!.* {2})(?=\S)(?=.*\S$)[a-zA-Z0-9- &]{2,100}$
/
g

Description

No trailing spaces or extra spaces max char 200 min 2 and hyphen and & only allowed

Submitted by Natalia zolotareva - 2 years ago