[pmwiki-users] Markup: Extract the group name from argument $1
Claude Montpetit
claude at montpetit.net
Sun Jan 30 20:30:19 CST 2005
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>
I am not sure if this can be done. Can the $1 argument be parsed in this
markup definition ?
My current alternative is to have various markups, one for each language:
Markup("fr'", "inline", "/fr'(.*?)'fr/", "<div>[[$1 | fr]]</div>");
Markup("en'", "inline", "/en'(.*?)'en/", "<div>[[$1 | en]]</div>");
Thanks,
Claude
More information about the pmwiki-users
mailing list