From: Florian Gross Date: 2004-01-12T02:52:07+09:00 Subject: Re: regex to NOT match? Ruby Baby wrote: > EXAMPLE: > myString = 'I want only the letters a and t and period. When done it should look like atttaatta.tatttaatta..' irb(main):002:0> myString.tr("^at.", "") => "attttaata.tatttaatta.tatttaatta.." Please notice that in regexps there is no general and easy way to not match a sub-pattern. (It's however possible to match stuff which isn't in a character class with [^abc] and there's exotic stuff like negative look-ahead which are very complex and not worth the effort most of the time.) > Thanks! Regards, Florian Gross