title: Matching Unicode letter characters in PCRE/PHP
body: <p>I'm trying to write a reasonably permissive validator for names in PHP, and my first attempt consists of the following pattern:</p>
  
  <pre><code>// unicode letters, apostrophe, hyphen, space
  $namePattern = "/^([\\p{L}'\\- ])+$/";
  </code></pre>
  
  <p>This is eventually passed to a call to <code>preg_match()</code>. As far as I can tell, this works with your vanilla ASCII alphabet, but seems to trip up on spicier characters like Ă or 张.</p>
  
  <p>Is there something wrong with the pattern itself? Perhaps I'm expecting <code>\p{L}</code> to do more work than I think it does?</p>
  
  <p>Or does it have something to do with the way input is being passed in? I'm not sure if it's relevant, but I did make sure to specify a UTF8 encoding on the form page.</p>