- preg_match: documentation ( source)
<?php
$mystring = "";
if (strlen($mystring) >= 10 && strlen($mystring) <= 32) {
if (preg_match("/\d{3}/", $myString, $matches) > 0 ) {
print "matches";
}
else {
print "not matches";
}
}
else {
print "not in range";
}