I am trying to write RegExp for validation
- string will be alphanumeric with not having space between words.
- after each word comma will be added by user and after that space get added
- not allow space and comma in end of word and not allow more than 5 comma separated values
I wrote following regExp code but it fails on second.
^[0-9a-zA-Z]+(\, [0-9a-zA-Z]+){0,4}$