But if you just want to know if a string contains a comma or not, then it's overkill to use a regular expression - you can also simply use String.indexOf(), which is easier, shorter and faster:
Ah, thank you Jesper, although I've read the documentation of reg exp few times, I always find myself struggling with it... And thank you for the second suggestion, it does make more sense. [ August 13, 2007: Message edited by: Roy Cohen ]