if (length $s1 > $i) {
my $c1 = substr $s1, $i, 1;
if ($s1 =~ /^\Q$prefix/) {
- next if $c1 eq $char;
+ next if $c1 le $char;
}
}
push @allow, $prefix."(?![$char-$last])"
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More tests => 22;
use Test::NoWarnings;
use Data::Dump 'pp';
[ 'q-xxx' => '(?:[q-w]|x(?![x-z])|xx(?![x-z])|xxx)'],
['qqq-x' => '(?:[r-x]|q[r-z]|qq[q-z])'],
['qaa-qb' => '(?:qa[a-z]|qb)'],
+ ['qaa-qq' => '(?:q[b-p]|qa[a-z]|qq)'],
['qqq-q' => '(?:q[r-z]|qq[q-z])'],
) {
my ($in, $out) = @$_;