« first day (6 days earlier)      last day (1321 days later) » 

7:33 AM
Grimy, has that changed? Just quickly trying to find info about that, and I see on regular-expressions.info/recursecapture.html it says "When Perl 5.10 [through to 5.18]'s regex engine enters recursion, all capturing groups appear as they have not participated in the match yet."
But that appears to have changed in 5.20
 
8:05 AM
Ooh you’re right it appears to work on recent Perls
I had only tested on a 5.16
 
Yay
Also, I'm getting a very puzzling result from this perl bot on IRC (running v 5.24)
[11:22:33] <+jaytea> !eval ["blaXhiiiiiiii" =~ /(?=(?'a'[\s\S]*))(?'b'X(?=\k'a'\z)|(?<=(?=$x|(?&b))[\s\S]))(.+)/]
[11:22:36] <+perlbot> ["laXhiiiiiiii","","laXhiiiiiiii"]
the result contains the value of \1 and \2 (a and b)
 
yeah
that’s what a regex with capturing group returns
and $& is set to the whole match, if you need that
 
The result implies "(?&b)" matches an empty string, so (?<=(?=$x|)[\s\S]) matches at the first opportunity, just after "b"
[12:12:30] <+jaytea> !eval ["abc" =~ /(\w)(?<=(?=(?1)c))/]
[12:12:34] <+perlbot> ["a"]
[12:12:41] <+jaytea> !eval ["abc" =~ /(\w)(?<=(?=(?1)b))/]
[12:12:45] <+perlbot> []
(?1) isn't matching empty there, at least
 
8:30 AM
Found it :P I think "$x" isn't good enough of a non-empty contradiction for Perl
Wait, the opposite, Perl doesn't need those: (?=(?'a'[\s\S]*))(?'b'X(?=\k'a'\z)|(?<=(?=$x|(?&b)).)) works fine haha
er
I mean (?=(?'a'[\s\S]*))(?'b'X(?=\k'a'\z)|(?<=(?=(?&b)).))
Looks like Perl is doing something with "$x". Maybe some sort of optimization. Very puzzling. "x^" is fine though, so the expression can be touted for both Perl/PCRE now with that :)
 

« first day (6 days earlier)      last day (1321 days later) »