Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Replacing between patterns

by rsFalse (Chaplain)
on Oct 29, 2019 at 13:25 UTC ( [id://11108068]=note: print w/replies, xml ) Need Help??


in reply to Re: Replacing between patterns
in thread Replacing between patterns

Similarly, but with /m and $:
echo "123 ABC 123 abc XYZ hi la" | perl -0777 -pe 's/ ABC .*? XYZ .*? $ /[DATA]/msx' 123 [DATA] la

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found