<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 3, 2015 at 9:06 PM, Thierry <span dir="ltr"><<a href="mailto:pmwiki@lma.metelu.net" target="_blank">pmwiki@lma.metelu.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":1a3" class="" style="overflow:hidden">My question is: how to let PageList understand that the content of the<br>
"Abstract" field is all the lines that appear between ":Abstract:" and the<br>
definition of the next variable in the page ?</div></blockquote></div><br>Currently $PageTextVarPatterns is defined in pmwiki.php as:</div><div class="gmail_extra"><br></div><div class="gmail_extra">===(snip)===</div><div class="gmail_extra"><div class="gmail_extra">$PageTextVarPatterns = array(</div><div class="gmail_extra">  'var:'        => '/^(:*\\s*(\\w[-\\w]*)\\s*:[ \\t]?)(.*)($)/m',</div><div class="gmail_extra">  '(:var:...:)' => '/(\\(: *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(:\\))/s'</div><div class="gmail_extra">  );</div></div><div class="gmail_extra">===(snip)===</div><div class="gmail_extra"><br></div><div class="gmail_extra">You could extend this specifically for a variable named "Abstract" as follows:</div><div class="gmail_extra"><br></div><div class="gmail_extra">$PageTextVarPatterns['abstract'] = '/^(:*\\s*(Abstract)\\s*:[ \\t]?)(.*?)(\\n(?::*\\s*(?:\\w[-\\w]*)\\s*:))/s';</div><div class="gmail_extra"><br></div><div class="gmail_extra">Potential problems with the proposed solution:</div><div class="gmail_extra">* I typed this into an email editor and so I very well (almost certainly) might have messed up the regex (mis-matched parens, typos, thinkos, etc.)</div><div class="gmail_extra">* Now both the 'var:' and the 'abstract' definition will match 'Abstract:' variable defs - not sure what implications that will have - you may need to complicate the 'var:' definition to match any variable but Abstract probably by means of </div><div class="gmail_extra">** a negative lookahead (?!Abstract) after the first \\s*</div><div class="gmail_extra">*** $PageTextVarPatterns['var:'] = '/^(:*\\s*(?!Abstract)(\\w[-\\w]*)\\s*:[ \\t]?)(.*)($)/m';</div><div>** or a negative lookbehind (?<!Abstract) before the second \\s*<br></div><div>*** $PageTextVarPatterns['var:'] = '/^(:*\\s*(\\w[-\\w]*)(?<!Abstract)\\s*:[ \\t]?)(.*)($)/m';</div><div>* Same caveat re typos, thinkos, etc on the regexes above.</div><div><br></div><div>-Peter</div></div>