Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Search and Replace

by dbwiz (Curate)
on Aug 27, 2003 at 14:47 UTC ( #287055=note: print w/ replies, xml ) Need Help??


in reply to Re: Search and Replace
in thread Search and Replace

What about a one-liner?

If you have your replacement strings in "repl.txt", this will do the trick.

perl -0pe 'BEGIN{open R,"repl.txt";$repl=<R>;close R}s/(<REANALYZED>). +*?(<\/REANALYZED>)/$1$repl$2/s' original.txt


Comment on Re: Re: Search and Replace
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2016-02-12 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (411 votes), past polls