Regular Expressions 101

Community Patterns

Community Library Entry

-2

Regular Expression
ECMAScript (JavaScript)

/
[^,\s]+(,([^,\s])+){0,}
/

Description

Validating comma delimited strings for whitespaces & extra commas -- [^,\s]+(,([^,\s])+){0,}

Submitted by Cyril Mathew - 9 years ago