------art_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 <stuart / server-solution.co.uk> 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
-- 
Encontra "Tu psicˇ­ata 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

------art_35973_24821618.1149512379511--