title: Use regex to find out if a string is just a single repeated character
body: <p>I'm writing a PHP script and I'm at this point where I need to know if a string consists of one character that's just repeated. The character is even a specific one: it's <code>z</code>.</p>
  
  <p>For example, I want to match <code>"z"</code>, <code>"zzz"</code> or <code>"zzzzzzzzz"</code> but not <code>"zaz"</code> or <code>"aaa"</code>.</p>
  
  <p>This is probably a simple regex question, but I have no idea how to do this. Anyone?</p>