Reputation: 15351
Why does the letter é
count as a word boundary matching \b
in the following example?
Pattern: /\b(cum)\b/i
Text: écumé
Matches 'cum' which is not desired.
Is it possible to overcome this?
Upvotes: 5
Views: 1152
Reputation: 92996
It will work, when you add the u
modifier to your regex
/\b(cum)\b/iu
Upvotes: 13