From: Diego Suarez Date: 2007-09-07T17:41:08+09:00 Subject: Re: Reg Ex ------=_Part_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 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/ > > ------=_Part_55408_29656205.1189154466721--