Thomas, Mark - BLS CTR graced perl with these words of wisdom:
> For the letter-substitution matches, why not create mini-re for each
> one?
>
> $a = qr/[EMAIL PROTECTED]/;
> $i = qr/[i1l\|]/;
>
> $str = "v|agr@";
>
> if ($str =~ /v${i}${a}gr${a}/) {
> #it's spam
> }
>
Because Hamster d
Mark Thomas wrote:
>
> > (i|1|l|\|) to kill the vertical pipe, but I find that much
> > harder to read and more difficult to extend later on.
>
> For the letter-substitution matches, why not create mini-re for each one?
>
> $a = qr/[EMAIL PROTECTED]/;
> $i = qr/[i1l\|]/;
>
> $str = "v|agr@";
>
> (i|1|l|\|) to kill the vertical pipe, but I find that much
> harder to read and more difficult to extend later on.
For the letter-substitution matches, why not create mini-re for each one?
$a = qr/[EMAIL PROTECTED]/;
$i = qr/[i1l\|]/;
$str = "v|agr@";
if ($str =~ /v${i}${a}gr${a}/) {