[pmwiki-devel] regex in markup question
John Rankin
john.rankin at affinity.co.nz
Sun May 23 08:50:26 CDT 2010
> Saturday, May 22, 2010, 7:28:20 PM, DaveG wrote:
>
>>> Markup('X:abc', '>[=','/\n(X:\\s*\\d+\\s*\n.*?)\n<:vspace>/se',
>>> "PreserveAbcText(PSS('$1'))");
>
>> Just a note here, that tunes on the very first list might not get
>> captured by this regex, as there would not be a preceding newline.
>
> You are right! If I leave out the first \n, how do I makesure that
> X: is at the beginning of a line?
I think you can write "/(?:\n|^)(X: ...
BTW, good tip about the <:vspace>!
JR
More information about the pmwiki-devel
mailing list