From: Sebastian Hungerecker Date: 2009-07-14T20:35:38+09:00 Subject: Re: a regex that does not contain comma Am Dienstag 14 Juli 2009 12:48:25 schrieb Axel Schmalowsky: > Well, negative logic .. ;-) Wich does not work if you pass the regexp as an argument to a method instead of using it in a conditional. > This regexp matches correctly if the string consists only of a comma: > > /(?>(?:\w+\s*)*(?=,))+/ So does /,/. Honestly, what's wrong with /,/? Or /(?=,)/ if you really need it to not consume the match, though I don't see why you would.