by fizbin · 11y ago · 0 comments
The original 32K regex pointed to in the stackexchange problem statement however is perfectly correct.
Test code:
open(F, '< /tmp/q.in');
$myre = <F>;
chomp($myre);
$myrecomp = qr/^(?:$myre)$/;
while (<>) {
chomp();
if (m/$myrecomp/) {
print "$_\n";
}
}
Examples of multiples of 7 not matched by the given regex: 70, 707, 7007, 11095(I spent all morning trying to find the bug in my regex compiler based on the assumption that the answer there was correct)
No comments yet.