Friday, April 10, 2009

Reg Ex to validate comma delimited fields

Here's something that I cooked up that perhaps someone could find useful.

[\\w\\d]*(,[\\w\\d]*)*

e.g input asdf123,asdf234,asdf2134



no spaces between commas so that saves you from having to trim later.