title: OOPHP Regex for White Spaces
body: <p>I am building a OOPHP web application, I am working on a regular expression that ONLY accepts lower/capital case letter along with white spaces. I have been trying to implement the white spaces but for some reason it not working, normally in JAVACC I do something like this:</p>
  
  <pre><code>(["a" - "z"])+ | (["A" - "Z"])+ | " " | "\t" | "\n" | "\r" 
  </code></pre>
  
  <p>How can I rewrite the top expression in PHP? This is what I have so far (it works, but I don't know how to implement the white spaces in php).</p>
  
  <pre><code>/^[a-zA-Z]*$/
  </code></pre>