Community Patterns

Community Library Entry

0

Regular Expression
Created·2019-07-23 11:40
Flavor·PCRE (Legacy)

/
^(?:[a-zA-Z0-9\-\_]++\ *+(?(?=\,)\,+\ *+|$))*+$
/
gm
Open regex in editor

Description

Check if a string matches the conditions of being a list of alphanumeric, underscore and minus only strings, separated by commas (which can have spaces on either side).

Submitted by anonymous