<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 5, 2015 at 10:44 AM, Peter Bowers <span dir="ltr"><<a href="mailto:pbowers@pobox.com" target="_blank">pbowers@pobox.com</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 class="gmail_extra"><font><font>You could extend this specifically for a variable named "Abstract" as follows:</font></font></div><div class="gmail_extra"><br></div><div class="gmail_extra"><font><font>$PageTextVarPatterns['</font></font><font><font>abstract'] = '/^(:*\\s*(Abstract)\\s*:[ \\t]?)(.*?)(\\n(?::*\\s*(?:\\</font></font><font><font>w[-\\w]*)\\s*:))/s';</font></font></div></blockquote></div><br>OK, I got a chance to actually try it out and my fears re typos & thinkos were validated but my fears re having 'var:' definition match as well ended up not being a problem.</div><div class="gmail_extra"><br></div><div class="gmail_extra">On my system I add this (slightly modified from above) to my config.php and *voila* {$:Abstract} magically becomes a multi-line PTV:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">$PageTextVarPatterns['abstract'] = '/(?:^|\\n)(:*\\s*(Abstract)\\s*:[ \\t]?)(.*?)(\\n(?::*[ \\t]*(?:\\w[-\\w]*)[ \\t]*:)|$)/s';</div><div><br></div><div>No need to modify the ':var' element of that array, at least in my abbreviated testing. (Apparently the later definition over-writes the value obtained in the earlier definition since there's no break in the loop in PageTextVar()...)</div><div><br></div><div>I have a vague recollection that WikiForms separates PTVs with a double-newline, so you may want to replace the second \\n with a double \\n\\n to avoid picking up an extra newline. That would look like this:</div><div><br></div><div><div><font><font>$PageTextVarPatterns['abstract'] = '/(?:^|\\n)(:*\\s*(Abstract)\\s*:[ \\t]?)(.*?)(\\n\\n(?::*[ \\t]*(?:\\w[-\\w]*)[ \\t]*:)|$)/s';</font></font></div></div><div><font><font><br></font></font></div><div><font><font>But if you ever ended up with a PTV immediately following the Abstract without the intervening newline then this definition would happily swallow the entire subsequent PTV definition.</font></font></div><div><br></div><div><font><font>-Peter</font></font></div></div></div>