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> --->
In reply to Re: Unexpected results from a regex replacement
by ikegami
in thread Unexpected results from a regex replacement
by yacoubean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |