http://qs1969.pair.com?node_id=287055


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