[pmwiki-users] Markup: Extract the group name from argument $1
John Rankin
john.rankin at affinity.co.nz
Sun Jan 30 20:47:25 CST 2005
On Monday, 31 January 2005 3:30 PM, Claude Montpetit <claude at montpetit.net> wrote:
>
>I want to create a custom markup that looks like this:
>
> Markup("x'", "inline", "/x'(.*?)'x/", "<div>[[$1 |
>y]]</div>");
>
>where "y" is the group extracted from $1. I want to use this
>like that:
>
> x'Fr.PageEnFrancais'x
>
>which should return:
>
> <div>[[Fr.PageEnFrancais | Fr]]</div>
Leaving aside the <div> for a moment, you could write:
[[Fr(.PageEnFrancais)]]
The text in ( ... ) is removed from the displayed link text.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list