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

Hans Bracker design at softflow.co.uk
Sun Jan 18 06:47:12 CST 2015


For your example PTV pattern
<<< (myvar) text 
and text. >>>

to disallow line breaks after the initial <<<
but still allow spaces,
you could use these definitions:

Markup('<<<var', '<split', '/<<< *\\((\\w[-\\w]*) *\\)(.*?)>>>/s', '$2' );

$PageTextVarPatterns['<<<var...>>>'] = '/(<<< *\\(*(\\w[-\\w]*) *\\)(?!\\))\\s?)(.*?)(>>>)/s';

Best, Hans

More information about the pmwiki-users mailing list