Now that's a neat trick. After getting up off the floor following fainting at the very sight of it, I'll have to read perlrun again to understand how you did it. It's high time I dig into perldebug too, I see.
I find '-Dr' far more useful than 'YAPE::Regex::Explain'.
The latter just parrots back what it was given, but then in
English. '-Dr' shows how perl compiles it. As shown in the
thread 'YAPE::Regex::Explain' doesn't notice the overlap between \S and \W, not even that '*' is mentioned twice.
'-Dr' shows what's really going on, although the output is
sometimes hard to grog.
And '-Dr' really shines at runtime, showing how Perl actually
matches a regexp.