title: Using unicode in a regular expression with PHP
body: <p>I'm trying to add the character <code>Ö</code> (U+00D6) to my regular expression below. Apparently something is going wrong because it's not working on my <code>preg_match</code> function.</p>
  
  <p>The regular expression that works fine:</p>
  
  <pre><code>/^([A-Z]{1})[a-z]{1,31}$/
  </code></pre>
  
  <p>The one that should work but does not:</p>
  
  <pre><code>/^([A-Z\x{00D6}]{1})[a-z]{1,31}$/
  </code></pre>
  
  <p>I'm obviously trying to create a regular expression that is started with an uppercase letter extended with <code>Ö</code> and followed by lowercase letters. In total, the length of the string must be between 2-32.  What is wrong with the regular expression that contains the Unicode expression for <code>Ö</code>?</p>