I am trying to write a regex that will only allow text uppercase and lower. I had no idea how to write any regex so I found a post on Stack
How do I write a regex in PHP to remove special characters?
With a link to a place to learn. The tut is fantastic so do read if yuo have trouble with regex.
if( preg_match('/^([A-Za-z\s]+)&/', $pagename) ) {
//do stuff
}
else
{echo"no special char or num";}
How ever it fails. If I type for example
New Web Page
it should allow this but it fails.