$string = 'SSM1234';
preg_match("SS{2,}\M+\[0-9]", $string);
Why does this regex not match my sample $string?
i need to check whether the given id is email address or ssmid.....also check there regular expression
if((!preg_match("/^S{2,}M+[0-9]+$/", $Forgot_field)) || (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/", $Forgot_field))){
$result = "Enter a valid SSM ID or Email ID";
}