or better yetmy $pat = "\\d\\s+foo";
my $pat = qr/\d\s+foo/;
Your pat incorrectly matches "dssssfoo", and doesn't match "1 foo" as it should.
my $pat = "\d\s+foo"; print("$pat\n"); # ds+foo
In reply to Re^2: PCRE: Repeating Subpattens After Intervening Characters
by ikegami
in thread PCRE: Repeating Subpattens After Intervening Characters
by schnarff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |