Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Deleting everything before a string

by cat2014 (Monk)
on Dec 21, 2000 at 09:28 UTC ( [id://47733]=note: print w/replies, xml ) Need Help??


in reply to Deleting everything before a string

the easiest way is just s/^(.*)\+_/\s\+_$1\+_/s
of course, there are a few caveats with that:
i don't believe that . matches the new line character, (unless you have the s at the end of the s///) and you will only end up with one space for all the stuff before the + that you replaced. did you want just one white space character, or 1 for every character that you replaced? and i just realized that you want to delete after the +, too. the first answer is much better than my quick regex. would tr/// work for this?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found