[pmwiki-users] regex for full page names with anchor suffixes

Hans design5 at softflow.co.uk
Thu Nov 8 13:13:15 CST 2007


I am looking for an inclusive regex pattern for full or partial
(without group part) page names including possible suffix for anchors,
like the ones function TextSection() processes.

I got the following right now, but it may well miss out some pages?
(I just added the - )

'(?>([\\w-]+\\.?[\\w-]+\\#?\\#?[\\w-]+\\.?\\.?\\#?[\\w-]*)[:=])'

The end [:=] is needed since I use  the pattern for ParseArgs().
It should be rather more inclusive than strict, so I did not bother
about the permutations of #anchor.. syntax too much.

What I would love is also a possible divider of => in addition to =
and : , to indicate a direction. I use these to tie template pages
with target pages in the markup.

  ~Hans   




More information about the pmwiki-users mailing list