From: Paul Lutus Date: 2006-08-31T01:40:31+09:00 Subject: Re: easy question i hope Caspar Bl wrote: > hi i need to strip out some boolean operators from search input > this is what i need to remove > params[:search_input].gsub!(/AND|OR|&&|||/,'') > it all works except for || which i suppose is because it is interpreted > as meaning or nothing or nothing. so how can i remove the || from the > input? Some characters have special meaning to the regular expression engine. To force them to be interpreted literally (as normal characters), escape them, like this: params[:search_input].gsub!(/AND|OR|&&|\|\|/,'') -- Paul Lutus http://www.arachnoid.com