title: PHP: case-insensitive preg_replace of a cyrillic string in UTF8
body: <p>I have <a href="http://preferans.de/top.php" rel="nofollow">a PHP 5.3 script</a> 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):</p>
  
  <pre><code>preg_replace('/Волгоград/iu', 'Сталинград', $city);
  </code></pre>
  
  <p>Unfortunately this only works for exact matches: <strong>Волгоград</strong>.</p>
  
  <p>This does not work for other cases, like <strong>ВОЛГОГРАД</strong> or <strong>волгоград</strong>.</p>
  
  <p>If I modify my source code to</p>
  
  <pre><code>preg_replace('/[Вв]олгоград/iu', 'Сталинград', $city);
  </code></pre>
  
  <p>then it will catch the 2nd case above.</p>
  
  <p>Does anybody know what it going on and how to fix it (assuming I don't want to write <strong>[Xx]</strong> for <em>every</em> letter)?</p>
  
  <p>Thank you!
  Alex</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre><code># rpm -qa|grep php
  php53-bcmath-5.3.3-1.el5
  php53-gd-5.3.3-1.el5
  php53-common-5.3.3-1.el5
  php53-pdo-5.3.3-1.el5
  php53-mbstring-5.3.3-1.el5
  php53-xml-5.3.3-1.el5
  php53-5.3.3-1.el5
  php53-cli-5.3.3-1.el5
  php53-pgsql-5.3.3-1.el5
  
  # rpm -qa|grep pcre
  pcre-6.6-2.el5_1.7
  </code></pre>