in reply to Unexpected results from a regex replacement
The problem is outside what you showed us here, I bet. What you showed works fine (as seen below). Could you provide more of the code?
$outdata = <<'__EOI__'; <cfmail to="#to_address#"> ...... </cfmail> __EOI__ $outdata =~ s{<cfmail}{<!--- <cfmail}g; $outdata =~ s{</cfmail>}{</cfmail> --->}g; print($outdata); __END__ output ====== <!--- <cfmail to="#to_address#"> ...... </cfmail> --->
|
|---|