You could try : url='http://www.youtube.com/watch?v=OY8AIhbqPHo' url[/watch\?/]="" or with a postive lookahead : url[/watch\?(?=v=OY8AIhbqPHo)/]="" On 18 juin, 05:58, Dan German <german... / yahoo.com> wrote: > It's actually a youtube url: ex.http://www.youtube.com/watch?v=OY8AIhbqPHo > I'm trying to remove the watch? string; the slice method works, but it > would be better if you could use something like gsub > > -- > Posted viahttp://www.ruby-forum.com/.