Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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 ''; } } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hazardous characters filter
by Kenosis (Priest) on Mar 24, 2014 at 19:33 UTC | |
by no_slogan (Deacon) on Mar 25, 2014 at 14:59 UTC | |
|
Re: Hazardous characters filter
by Laurent_R (Canon) on Mar 24, 2014 at 18:35 UTC | |
|
Re: Hazardous characters filter
by no_slogan (Deacon) on Mar 24, 2014 at 18:41 UTC | |
by Anonymous Monk on Mar 24, 2014 at 18:51 UTC | |
by Laurent_R (Canon) on Mar 24, 2014 at 19:59 UTC | |
|
Re: Hazardous characters filter
by MidLifeXis (Monsignor) on Mar 25, 2014 at 17:36 UTC | |
|
Re: Hazardous characters filter
by jellisii2 (Hermit) on Mar 25, 2014 at 11:33 UTC |