[pmwiki-users] Help for designing a new ptv pattern <<< my new multiline ptv pattern >>>

ABClf languefrancaise at gmail.com
Fri Jan 16 13:27:50 CST 2015

Hello hello,

I would like to set up a new pattern for multiline ptv ;
current (:bla bla this is a hidden ptv:) may me broken by the text.

Thus, I wish to create a more distinctive <<< new pattern >>> which would
work in the smiling case below :

<<< bla bla this is a new (hidden or not) ptv :) >>>

I don't know how to write the regex. Model is not easy to understand. May
someone help me ?

Thank you,

(by the way, $PageTextVarPatterns is not documented in the variables pages).

http://www.pmwiki.org/wiki/PmWiki/PageTextVariables-Talk says :
PageTextVar relies on the $PageTextVarPatterns variable (which can be used
to extend the recognized formats for page text variables in a page). In the
older 2.2.0 Beta versions of PmWiki, this variable wasn't initialized until
stdmarkup.php was run, after config.php was executed. Thus, if you needed
to use page text variables inside config.php, you had to initialize it
yourself. This is no longer necessary, but for those who are still running
earlier versions of the beta series, here's the value to use:
SDVA($PageTextVarPatterns, array(
  'var:' => '/^:*\\s*(\\w[-\\w]*)\\s*:[ \\t]?(.*)$/m',
  '(:var:...:)' => '/\\(: *(\\w[-\\w]*) *:(?!\\))\\s?(.*?):\\)/s'));


| A | de la langue française
| B | http://www.languefrancaise.net
| C | languefrancaise at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20150116/2919a4b1/attachment.html>

More information about the pmwiki-users mailing list