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:
(["a" - "z"])+ | (["A" - "Z"])+ | " " | "\t" | "
" | ""
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).
/^[a-zA-Z]*$/