PHP简单域正则表达式[重复]

This question already has an answer here:

I'm trying to figure out why a domain name (example1.commerce) isn't matching the following regular expression:

if (!preg_match('([a-z\d]){1,63}(\.)([a-z\d]){2,16}',$_POST['domain']))
{
 echo '<p>Error: domain is not valid.</p>';
}
else {echo '<p>Domain looks good.</p>';}

The pattern should only match the domain (1~63 characters) and domain suffix (2~16 characters); no subdomains, uppercase, etc.

All the online regex testers seem to work though

</div>

'([a-z\d]){1,63}(\.)([a-z\d]){2,16}'

should be

'/([a-z\d]){1,63}(\.)([a-z\d]){2,16}/i'

Most online regex testers add this here for you.