in reply to Unexpected results from a regex replacement
The results wereforeach my $outdata ( <DATA> ) { print "Init: $outdata\n"; $outdata =~ s{<cfmail}{<!--- <cfmail}g; $outdata =~ s{</cfmail>}{</cfmail> --->}g; print "Final: $outdata\n\n"; } __DATA__ <cfmail to="#to_address#"> </cfmail>
So it's hard to see where the your issue is coming from. My only assumption is that your regex code is in a loop that runs the 25 times that the comment characters get repeated. - jInit: <cfmail to="#to_address#"> Final: <!--- <cfmail to="#to_address#"> Init: </cfmail> Final: </cfmail> --->
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unexpected results from a regex replacement
by yacoubean (Scribe) on Nov 10, 2004 at 22:14 UTC | |
by Eimi Metamorphoumai (Deacon) on Nov 10, 2004 at 22:23 UTC |