}
}
unless (@ans) {
- $pre .= '*' unless $pre =~ /[\*\?\[]/o;
+ $pre .= '*' unless $pre =~ /[\*\?\[]$/o;
$pre = shellregex($pre);
+ if ($main::dbh) {
+ $pre =~ s/\.\*/%/g;
+ } else {
+ $pre =~ s/\.\*\$$//;
+ }
$expr = "\$f1 =~ m{$pre}";
$pre =~ s/[\^\$]//g;
$hint = "m{\U$pre}";
$expr .= ' && ' if $expr;
$spotter .= '*' unless $spotter =~ /[\*\?\[]/o;
$spotter = shellregex($spotter);
+ if ($main::dbh) {
+ $spotter =~ s/\.\*/%/g;
+ } else {
+ $spotter =~ s/\.\*\$$//;
+ }
$expr .= "\$f4 =~ m{\U$spotter}";
$hint .= ' && ' if $hint;
$spotter =~ s/[\^\$]//g;
$expr =~ s/\$f9/spotcq/g;
$expr =~ s/\|\|/ or /g;
$expr =~ s/\&\&/ and /g;
- $expr =~ s/=~\s+m\{\^([\w]+)[^\}]*\}/ like '$1%'/g;
+ $expr =~ s/=~\s+m\{\^([%\w]+)[^\}]*\}/ like '$1'/g;
} else {
$expr = '';
}