Regular Expressions 101

Community Patterns

Match a string with repeating characters separated by a comma (e.g., "a,b,c")

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:[a-zA-Z]+,)*[a-zA-Z]+$
/
gm

Description

Submitted by anonymous - a month ago