in reply to Re: PCRE: Repeating Subpattens After Intervening Characters
in thread PCRE: Repeating Subpattens After Intervening Characters

That should be
my $pat = "\\d\\s+foo";
or better yet
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