title: PHP regex for valid XML tag name
body: <p>What is a good general regex (in PHP terms) to determine if a string is a valid XML tag name?</p>
  
  <p>I startet using <code>/[^&gt;]+/i</code> but that also matches something like <code>4 \&lt;&lt;</code> which obviously isn't a valid tag name.</p>
  
  <p>So I tried combining all valid characters like <code>/[a-z][a-z0-9_-]*/i</code> which also isn't quite right, as XML allows virtually any character in tag names also of foreign languages.</p>
  
  <p>I'm stuck on that now - should I just check if there are whitespace characters? Or is there more to it?</p>