aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/regex.php
diff options
context:
space:
mode:
authorrubencm <rubencm@gmail.com>2019-10-24 20:03:32 +0000
committerrubencm <rubencm@gmail.com>2019-11-01 10:30:41 +0000
commitb6a99e7dcad10836cd2277ba2bd9a6c19afe90f1 (patch)
tree7e2292e84aa12d68424a0f945fd2d1330bc0e467 /phpBB/develop/regex.php
parentf09f5bc51c15eef526374105d6443270dc1172bf (diff)
downloadforums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.gz
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.bz2
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.xz
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.zip
[ticket/16188] Remove some legacy code and fix bug
PHPBB3-16189
Diffstat (limited to 'phpBB/develop/regex.php')
-rw-r--r--phpBB/develop/regex.php40
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}";