Another preg_match() [function.preg-match]: Unknown modifier '{';-)
function vldLicense($lic)
{
echo "called with lic: ". $lic . "<br>";
echo preg_match('[A-Za-z0-9]', $lic) . "<br>";
if (preg_match('[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-
z0-9]{4}', $lic) == 0) return false;
return true;
}
gives me:
called with lic: 64gd-kwey-t643-ytes
0
Warning: preg_match() [function.preg-match]: Unknown modifier '{'
Why the 0 in the simple match?
Why the unknown modifier in the complex match?
Thanks in advance
Jan
|