remove automatic [I1] and [O0] creation in regexes
authorminima <minima>
Thu, 4 Oct 2001 14:46:41 +0000 (14:46 +0000)
committerminima <minima>
Thu, 4 Oct 2001 14:46:41 +0000 (14:46 +0000)
perl/BadWords.pm

index dc0a10fc74a7c047a6944ac5644bdea1bfc18e33..db33d7a1c4ebaeb34127c79bb1f5c1463dc35463 100644 (file)
@@ -74,7 +74,7 @@ sub create_regex
                                # create a closure for each word so that it matches stuff with spaces/punctuation
                                # and repeated characters in it
                                my $w = uc $_;
-                               my @l = map { $_ eq 'I' ? '[I1]' : ($_ eq 'O' ? '[O0]' : $_) }split //, $w;
+                               my @l = split //, $w;
                                my $e = join '+[\s\W]+', @l;
                                my $s = eval qq{sub { return \$_[0] =~ /$e+/ ? '$w' : () } };
                                push @regex, $s unless $@;