Instead, its replacing all "<" and ">". Thanks for looking!... my $test = "this is not OK < but this is ok <url>"; my $res = rep( $test ); print "\n\n$res\n\n"; sub rep { if ( $_[0] ) { $_[0] =~ s/<|>//g unless $_[0] =~ /(\<\burl\b\>)/i; return $_[0]; }else { return ''; } } ...
In reply to Hazardous characters filter by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |