[Pmwiki-users] Help with PHP regexp

John Feezell johnfeezell
Mon Jan 5 10:37:14 CST 2004


I recently began studying PHP regular expressions so that I could use them 
with PmWiki and FTS.  I have material from the PHP manual but would like to 
know how others on the list have gained knowledge of these - websites, 
books, etc..

I also found a nice website for testing them, etc., at:
http://samuelfullman.com/team/php/tools/regular_expression_tester_p2.php

It would be helpful to see an analysis of one or two of them as they relate 
to PmWiki.
For example I'm studying the following from PmWiki.php
$GroupNamePattern="[A-Z][A-Za-z0-9]+";
$WikiWordPattern="[A-Z][A-Za-z0-9]*(?:[A-Z][a-z0-9]|[a-z0-9][A-Z])[A-Za-z0- 
9]*";
$FreeLinkPattern="{{(?>([A-Za-z][A-Za-z0-9]*(?:(?:[\\s_]*|-)[A-Za-z0-9]+)*) 
(?:\\|((?:(?:[\\s_]*|-)[A-Za-z0-9])*))?)}}((?:-?[A-Za-z0-9]+)*)";
$FragmentPattern="#[A-Za-z][-.:\\w]*";
$PageTitlePattern="[A-Z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)*";
$UrlPathPattern="[^\\s<>[\\]\"\'()]*[^\\s<>[\\]\"\'(),.?]";

The first one $GroupNamePattern="[A-Z][A-Za-z0-9]+" I now understand and 
can explain.  The others ... well I'm working on them.

Thanks for any comments, suggestions, illustrations, etc.

-JF 



More information about the pmwiki-users mailing list