Just checking back in to say hey guys :) The last few months have been a blur: planned a wedding, got married, had a honeymoon - whew! It's great to see there's still some activity on the regex front. I'm hoping to rekindle the old flame and start participating in challenges, updating my blog, and finally completing the quiz I've had in the works for a long ass time
Grimy is brilliant and I wouldn't put it past him to have discovered it independently.. but what a cool coincidence. And you discovered it in response to the very same challenge (find a unique character) if I'm not mistaken?
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 :)
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."
Does ^\C*$ hold true for arbitrary strings in any environment? Because I could've sworn I've seen it fail.. but I might be confusing that with it throwing runtime errors when encountering stray surrogates
(?s:(?=(?<a>.*))(?<b>X(?=\k<a>\z)|(?<=(?=$x|(?&b)).))) you guys fancy trying to break that, claimed to be a plug-n-play equivalent of (?<=X) (aside from the fact that it creates two capture groups)
@Grimy if you're not planning to publish this formally anywhere, would you mind terribly if I wrote it up and put it on drregex.com? With profuse crediting to yourself, of course. The regex world needs to see this!
Longest word in a string fully functional: \b(\w++)(?=([\s\S]*))(?!.*\b\w++(?=([\s\S]*))((?<=(?=(?=\1\2\z)(?:(?=.*\b(\5?+\w)\w*+\3\z)\w)++\b|(?4)|[^\s\S]).)))