<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 24, 2009, at 5:34 AM, <a href="mailto:rogutes@googlemail.com">rogutes@googlemail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Vince Admin Account (2009-10-23 16:01):<br><blockquote type="cite"><br></blockquote><blockquote type="cite">On Oct 19, 2009, at 5:13 PM, <a href="mailto:rogutes@googlemail.com">rogutes@googlemail.com</a> wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The problem with pagelists lies in GlobToPCRE() function in pmwiki.php<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">and is tracked at <a href="http://pmwiki.org/wiki/PITS/01149">http://pmwiki.org/wiki/PITS/01149</a> . It concerns<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">exclusion patterns (name=-Page) only.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br>(:pagelist group=-PmWiki*,-Site*:) works fine here. Doesn't it work for<br>you? Are you sure you've made the right changes to GlobToPCRE()? The<br>line with str_replace call looks like this after changing:<br><br>$pat = str_replace(array('\\*', '\\?', '\\[', '\\]', '\\^', '\\-'),<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array('.*', &nbsp;'.', &nbsp;&nbsp;'[', &nbsp;&nbsp;']', &nbsp;&nbsp;'^', '-'), $pat);<br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote>Well, I think I am sure. I can cut and paste, in case my eyes are too tired. Here is the entire function.&nbsp;</div><div><div>function GlobToPCRE($pat) {</div><div>&nbsp;&nbsp;$pat = preg_quote($pat, '/');</div><div>&nbsp;&nbsp;$pat = str_replace(array('\\*', '\\?', '\\[', '\\]', '\\^', '\\-'),</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array('.*', &nbsp;'.', &nbsp; '[', &nbsp; ']', &nbsp; '^', '-'), $pat);</div><div>&nbsp;&nbsp;$excl = array(); $incl = array();</div><div>&nbsp;&nbsp;foreach(preg_split('/,+\s?/', $pat, -1, PREG_SPLIT_NO_EMPTY) as $p) {</div><div>&nbsp;&nbsp; &nbsp;if ($p{0} == '-' &nbsp;) $excl[] = '^'.substr($p, 0).'$';</div><div>&nbsp;&nbsp; &nbsp;else $incl[] = "^$p$";</div><div>&nbsp;&nbsp;}</div><div>&nbsp;&nbsp;return array(implode('|', $incl), implode('|', $excl));</div><div>}</div><div><br></div><div>Some other interesting things I found here. &nbsp;We are running Apple Snow Leopard, PHP 5.3.0 and Apache 2.2.11.</div><div>When I tried to test pieces of this code on my web page, &nbsp;the line&nbsp;</div><div>$pat = preg_quote($pat,'\');&nbsp;</div><div>gave a syntax error. &nbsp;It worked as in the manual with a few other characters instead of \. I did get it to work as advertised with&nbsp;</div><div>$pat = preg_quote($pat,'\\');</div><div>I tried that in GlobToPCRE, but it didn't help. &nbsp; &nbsp; So I am confused. &nbsp;But at least I do have the workaround.</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vince</div><div>&nbsp;</div></div></body></html>