I want to replace Devanagari Unicode characters of specific sequence.
$re = '/(कर(?![ािीुूृॄॅेैॉोौ्ऱ्]))/m';
$str = 'समर साकाकरुन भरुन करमरकर';
$subst = '****';
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
notice that substitution is **** for every occurrence for कर if these ([ािीुूृॄॅेैॉोौ्ऱ्) characters are not followed to this (कर) pattern. This works correctly on https://regex101.com/r/WRc04s/1 but not on my WAMP or LAMP setup Point to note is that this does work as expected using English (Latin) character set. What could be the issue?