in reply to Regex puzzle for you

Update: De-spoilerized.

Underscore is in \w, so the captured word greedily contains as many as are consistent with the trailing _+ pattern. The re engine had to backtrack to remove the final '_'.

After Compline,
Zaxo