[pmwiki-devel] regex in markup question

John Rankin john.rankin at affinity.co.nz
Sat May 22 10:20:02 CDT 2010


>
> How do I catch a block of text(several lines)
> starting with X: on a new line and ending with
> an empty line.

Is there a reason you have to evaluate this <split?
Can the rule wait until after single newlines have
been joined to form a block, e.g.

Markup('X:', '<block', '/^(X:.*?)$/e',
  "PreserveAbc(PSS('$1'))");

The rule can be earlier if needed, say in directives.
I have also run into this problem from time to time
and never found a satisfactory solution.

JR
--
John Rankin
>
> I tried with this
> Markup('X:', '<split', '/\n(X:.*?)\n\n/se',
>    "PreserveAbc(PSS('$1'))");
> but keep failing getting the line delimiting the block,
> even though     '\n(X:.*?)\n\n/s'
> works fine in my regex tutor program.
>
> thanks for any help!
> Hans






More information about the pmwiki-devel mailing list