I have been trying to learn RegEx but I seem to be coming up just a bit short. The pattern I'm looking for is: xxxx-xxx-xxx-xxx This is what I tried but obviously it did not work: if(preg_match("^\d{4}\/\-\d{3}\/\-\d{3}\/\-\d{3}^",$val)) Any help would be greatly appreciated, Ron