in reply to Regex puzzle for you

Replying from the front page I have not seen other replies.
To having answer one must remember that

'__xxx__' =~ m/ \b # word boundary, matches begin of the string _+ # matches a couple of '_' because greedy (\w+) # matches the rest(greedy) but must do backtrack for whol +e regexp match _+ # after one backtrack matches last '_' \b /x;