From 985363e6626057fc4efb8b75a94a18aeeae73e54 Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 4 Oct 2001 14:46:41 +0000 Subject: [PATCH] remove automatic [I1] and [O0] creation in regexes --- perl/BadWords.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl/BadWords.pm b/perl/BadWords.pm index dc0a10fc..db33d7a1 100644 --- a/perl/BadWords.pm +++ b/perl/BadWords.pm @@ -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 $@; -- 2.34.1