in reply to Tell or determine whichever Perl regex group fails
Take a look at Regexp::Debugger. I've been using this module for about a decade and can highly recommend it.
"How to surely determine whichever Perl regex group fail ..."
It doesn't really work like that. Assuming you've installed Regexp::Debugger, you can run
$ rxrx -e 'q{okoK} =~ /(o|k)(k|i)(O|K)(K)/'
and watch:
So, as you can see, capture groups can potentially both succeed and fail at different points in the matching process.
— Ken
|
|---|