http://qs321.pair.com?node_id=186842


in reply to Remove from character to end of line

I would probably try a pattern like
s$\/+.*$$
which matches at least one forward slash and then any characters after it. note that perlstyle recommends that you not use a forward slash as the delimiter for any substitution or match involving slashes, but I don't know if that works from the command line, so use whatever delimiter is most friendly with your shell. I'm sure some regex guru will be along soon to provide a better answer, but this gets the job done at least (I think).

hth

--au