如何匹配具有非英语单词的字符串中的完整模式

$text="meeus meeùs";

I am using the following code to find exact substring mee if any.but since above string contains a dutch word so its failing in that case.that is it should replace the word in the $text string only when it matches the full pattern.

$text = preg_replace('/\bmee\b/u', ' ', $text);

Current Output:meeus mee

Desired Output:meeus meeùs

Which php version are you using? According to regular-expressions.info (select PHP in the drop down) PHP supports Unicode on word boundaries since version 5.3.4.

So if it is not working for you, you probably have an older version, where \b is ASCII based.