in reply to Re: search and replace is not working as expected...
in thread search and replace is not working as expected...

Thanks everyone for the quick replies. I basically just ended up doing:
$ARRGH =~ s/<doct>Customer trans\.(.*?)<\/doct>/<doct>Customer trans\. +<\/doct>/g;
as per the first suggestion and that one worked great. Thanks a lot!