[ticket/12866] Assume underscore is part of \w

PHPBB3-12866