added MAC address

This commit is contained in:
Roland Gruber 2004-11-01 11:50:42 +00:00
parent 88499fee73
commit f054eaf8b7
1 changed files with 3 additions and 0 deletions

View File

@ -485,6 +485,9 @@ function get_preg($argument, $regexp) {
case 'gecos':
$pregexpr = '/^[a-zA-z0-9 \\._-]+([,][a-zA-z0-9 \\._-]+)*$/';
break;
case 'macAddress':
$pregexpr = '/^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$/';
break;
}
if ($pregexpr!='')
if (preg_match($pregexpr, $argument)) {