You actually had the opposite problem: You had UTF-8, but the regex engine expects a string of Unicode Code Points[1]. utf8::decode provides the latter from the former.
More specifically, it's \w, \b, \d, etc that are defined in terms of UCP.
In reply to Re^4: \b in Unicode regex
by ikegami
in thread \b in Unicode regex
by Arik123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |