Use /u when calling preg_match

This fixes problems with multi-byte characters not being reconized as words.

Re #2154