From: Suraj Kurapati Date: 2008-01-30T08:35:29+09:00 Subject: Re: regular expression negate a word (not character) Since Ruby does not have a negative look *behind* operator, I just used the negative look *ahead* in a backwards way, et viola! >> puts a.reverse.gsub(/erit(?!.*wons)/, '>>>\&<<<').reverse somebody who is a regular expression guru... how do you negate a word and grep for all words that is <<>> but not snow tire or snowtire so for example, it will grep for winter <<>> <<>> re<<>> <<>>d but will not grep for snow tire snow tire some snowtires need to do it in one regular expression => nil -- Posted via http://www.ruby-forum.com/.