From: Mariano Kamp Date: 2006-06-05T22:19:35+09:00 Subject: Re: New webserver Hi Stuart, not sure if it is a good idea to handle security on this level, but you can try gsub instead of sub to replace all occurrences. Cheers, Mariano 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? > > Many thanks > > Stuart >