diff options
| author | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 | 
|---|---|---|
| committer | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 | 
| commit | 6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch) | |
| tree | 116d2565ac02c40abe0548863c6badf8ec3e1d1e /phpBB/develop/regex.php | |
| parent | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff) | |
| parent | 8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff) | |
| download | forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.gz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.bz2 forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.xz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.zip  | |
Diffstat (limited to 'phpBB/develop/regex.php')
| -rw-r--r-- | phpBB/develop/regex.php | 40 | 
1 files changed, 0 insertions, 40 deletions
diff --git a/phpBB/develop/regex.php b/phpBB/develop/regex.php index 46b6fff701..77c6d5c0e6 100644 --- a/phpBB/develop/regex.php +++ b/phpBB/develop/regex.php @@ -8,46 +8,6 @@  //  die("Please read the first lines of this script for instructions on how to enable it"); - -// IP regular expressions - -$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])'; -$h16 = '[\dA-F]{1,4}'; -$ipv4 = "(?:$dec_octet\.){3}$dec_octet"; -$ls32 = "(?:$h16:$h16|$ipv4)"; - -$ipv6_construct = array( -	array(false,	'',		'{6}',	$ls32), -	array(false,	'::',	'{0,5}', "(?:$h16(?::$h16)?|$ipv4)"), -	array('',		':',	'{4}',	$ls32), -	array('{1,2}',	':',	'{3}',	$ls32), -	array('{1,3}',	':',	'{2}',	$ls32), -	array('{1,4}',	':',	'',		$ls32), -	array('{1,5}',	':',	false,	$ls32), -	array('{1,6}',	':',	false,	$h16), -	array('{1,7}',	':',	false,	''), -	array(false, '::', false, '') -); - -$ipv6 = '(?:'; -foreach ($ipv6_construct as $ip_type) -{ -	$ipv6 .= '(?:'; -	if ($ip_type[0] !== false) -	{ -		$ipv6 .= "(?:$h16:)" . $ip_type[0]; -	} -	$ipv6 .= $ip_type[1]; -	if ($ip_type[2] !== false) -	{ -		$ipv6 .= "(?:$h16:)" . $ip_type[2]; -	} -	$ipv6 .= $ip_type[3] . ')|'; -} -$ipv6 = substr($ipv6, 0, -1) . ')'; - -echo 'IPv4: ' . $ipv4 . "<br />\nIPv6: " . $ipv6 . "<br />\n"; -  // URL regular expressions  $pct_encoded = "%[\dA-F]{2}";  | 
