in reply to Perl regex. Why does this happen?

See how the regex engine does the matching with use re 'debug'; or in color with rxrx