J John S Guest Apr 28, 2009 #1 I want to allow space as in spacebar. preg_match ('/^[A-Za-z0-9_]{4}$/', $name)