------ art_55408_29656205.1189154466721 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The boundaries could be a good idea, but if he needs urls like ciscosystems.com, with the final \b won't match. Keep that in sight :) On 9/7/07, S P Arif Sahari Wibowo <arifsaha / yahoo.com> wrote: > > On Fri, 7 Sep 2007, Charles Pareto wrote: > > file.each { |line| print line if line /(C|c)isco|CISCO/ } > ... > > Does anyone know how I can modify my reg exp to not include > > certain keywords like SanFrancisco and Francisco? > > How about: > /\b([Cc]isco|CISCO)\b/ > > or even > > /\bcisco\b/i > > ? > > -- > (stephan paul) Arif Sahari Wibowo > _____ _____ _____ _____ > /____ /____/ /____/ /____ > _____/ / / / _____/ http://www.arifsaha.com/ > > ------ art_55408_29656205.1189154466721--