- my @l = map { $_ eq 'I' ? '[I1]' : ($_ eq 'O' ? '[O0]' : $_) }split //, $w;
- my $e = join '+[\s\W]+', @l;
- my $s = eval qq{sub { return \$_[0] =~ /$e+/ ? '$w' : () } };
- push @regex, $s unless $@;
- dbg("create_regex: $@") if $@;
+ my @l = split //, $w;
+ my $e = join '+[\s\W]*', @l;
+ $s .= "push \@out, \$1 if \$str =~ /\\b($e)/;\n";