IPv6 check
This commit is contained in:
parent
b7bb54a035
commit
90003744e4
|
@ -565,6 +565,9 @@ function get_preg($argument, $regexp) {
|
|||
case 'ip': // IP address
|
||||
$pregexpr = '/^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}$/';
|
||||
break;
|
||||
case 'ip6': // IPv6 address (only basic check)
|
||||
$pregexpr = '/^[0-9a-f:]+$/i';
|
||||
break;
|
||||
case 'ascii': // ASCII
|
||||
$pregexpr = '/^[' . chr(1) . '-' . chr(128) . ']*$/';
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue