[pmwiki-users] Markup: Extract the group name from argument $1

Claude Montpetit claude at montpetit.net
Sun Jan 30 21:02:45 CST 2005


 > [...]
> Markup("x'", "inline",
>   "/x'(([^\\/.]+).*?)'x/",
>   "<div>[[$1 | $2]]</div>");
> 
> The outer parens capture everything between x' and 'x into $1.
> The inner parens capture the group part (everything before a dot
> or slash) into $2.
> 
> Pm

Thank you for the regexp course! And it worked just great.

John: the div is the reason why I use a markup: I want my language 
selector in a floating div somewhere on my page.

Claude



More information about the pmwiki-users mailing list