PHP: case-insensitive preg_replace of a cyrillic string in UTF8
问题 I have a PHP 5.3 script displaying users of my web site and would like to replace a certain Russian city (stored in UTF8 in PostgreSQL 8.4.7 database + CentOS 5.5/64 bits Linux) by its older name (it is an insider joke): preg_replace('/Волгоград/iu', 'Сталинград', $city); Unfortunately this only works for exact matches: Волгоград . This does not work for other cases, like ВОЛГОГРАД or волгоград . If I modify my source code to preg_replace('/[Вв]олгоград/iu', 'Сталинград', $city); then it will