From: Aaron Schulz Date: Thu, 18 Nov 2010 00:25:58 +0000 (+0000) Subject: (bug 25920) Moved forward ref to a nested ref to really get v6 regex to compile on... X-Git-Tag: 1.31.0-rc.0~33835 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=d0977b26a3c4cdeeca8ff5811c7a3e3725bd32e5;p=lhc%2Fweb%2Fwiklou.git (bug 25920) Moved forward ref to a nested ref to really get v6 regex to compile on older PCRE versions --- diff --git a/includes/IP.php b/includes/IP.php index 9aeba39f2c..356c770ce4 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -42,7 +42,7 @@ define( 'RE_IPV6_ADD', '|' . // has no "::" RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' . '|' . // contains one "::" in the middle (awkward regex for PCRE 4.0+ compatibility) - RE_IPV6_WORD . '(?::(?!(?P=abn))(?P:(?P))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' . + RE_IPV6_WORD . '(?::(?P(?!(?P=abn)):(?P))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' . // NOTE: (?!(?P=abn)) fails iff "::" used twice; (?P=iabn) passes iff a "::" was found. // Better regexp (PCRE 7.2+ only), allows intuitive regex concatenation