From: Sebastian Hungerecker Date: 2009-07-14T19:19:19+09:00 Subject: Re: a regex that does not contain comma Am Dienstag 14 Juli 2009 12:01:23 schrieb Axel Schmalowsky: > Trying the regexp /^[^,]*$/ fails with the code below: > [...] > Am I missing sth? Your code expects the regex to match if the string contains a comma and not match if the string does not contains a comma. That's the opposite of what Justin's regex does and also the opposite of what the Sijo asked for. Also if the goal had been to have the regex match if there is a comma /,/ would have sufficed as a regex. Also note that with your regexp your code outputs "string does not contain a comma" for the string ",". HTH, Sebastian