in reply to searching and replacing strings in a multi line variable

Your code allows several possible interpretations.

Could you please give us an example of the input and output data you expect?

Plus $regex and $replacement, please,

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: searching and replacing strings in a multi line variable