Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Remove from character to end of line

by aufrank (Pilgrim)
on Aug 01, 2002 at 16:57 UTC ( #186842=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://186842]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2022-12-09 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?