From: Edgardo Hames Date: 2006-06-05T21:59:45+09:00 Subject: Re: New webserver ------=_Part_35973_24821618.1149512379511 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 6/5/06, Stuart Brand wrote: > > Im designing a webserver as my first project on Ruby > > I need help with this line > > fileLine.sub(/\.\.\//, '') > > this is to remove any "../" that occur due to users trying to brake in, > or by accident ;) > > However, this only removes the first instance of the ../ how do I remove > every instance? I think you're looking for gsub. Cheers, Ed --=20 Encontr=E1 a "Tu psic=F3pata favorito" http://tuxmaniac.blogspot.com Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive. -- Seventh commandment for C programmers ------=_Part_35973_24821618.1149512379511--