replace

Find the boundary of a word that starts åäö

This is how you find a whole word by its boundary when the word is starting with åäö. The usual boundary expression can handle if Swedish characters is in the string but not if it starts (or ends) the word. That means that a word like "öknen" can't be found but a word like "behöver" will be found.

<?php
$text
= "I öknen behöver man vatten";
$keyword = "öknen";
//$keyword = "behöver";
?>

This is the usual boundary expression

Pages