My guess is this:
Spoiler:
It prints xxx_ because \w matches _.
In reply to Re: Regex puzzle for you by ambrus in thread Regex puzzle for you by QM