Pregmatch help

Hi guys,

I would like to validate a name field on a submitted form to allow:
letters, spaces, apostrophes and hyphens

this is causing my script to halt:

// Validate the name - abc's, spaces, periods and apostrophes only
if(empty($authors_name)){
	$error .= "Please enter your name.";
	}
	(!preg_match('/^[a-zA-Z/\\'/\\.-]{2,30}$/',$authors_name)){ 
		$error .= "Your name contains invalid characters.";
		}

There is no “if” at the beginning of the line containing the preg_match() function call, and the regular expression would be broken even if that were present.

P.S. By “causing my script to halt” you really mean, “causing my script to halt with a lovely, helpful error message which points me directly to the problem”, right?