[Pmwiki-users] Help (Beta13+) Want to swap {{ }} for [[ ]]

Patrick R. Michaud pmichaud
Sun Feb 15 08:29:20 CST 2004


Most of these are using the POSIX notation for character classes,
which works with international characters.

>    $GroupNamePattern="[[:upper:]][[:alnum:]]+";

A group name consists of an upper case character ([[:upper:]]) followed
by one or more alphanumeric characters ([[:alnum:]]+)

>    $WikiWordPattern="[[:upper:]][[:alnum:]]*(?:[[:upper:]][[:lower:]0-9]|
>    [[:lower:]0-9][[:upper:]])[[:alnum:]]*";

In general, a WikiWord starts with an uppercase character and has at least
one additional uppercase character and a lowercase character.  The part
in the (?...) parens matches an uppercase character followed by a lowercase
one or vice-versa.  [[:alnum:]] means zero or more alphanumeric characters.

>    $GroupFreeLinkPattern="{{(?>(?:($GroupNamePattern)([.\\/]))?([[:alpha:
>    ]][[:alnum:]]*(?:(?:[\\s_]*|-)[[:alnum:]]+)*)(?:\\|((?:(?:[\\s_]*|-)[[
>    :alnum:]])*))?)}}((?:-?[[:alnum:]]+)*)";

This one is too complex to explain this early in the morning.  Sorry.  :-)

>    $FragmentPattern="#([A-Za-z][-.:\\w]*)";

A URL fragment consists of a '#', followed by a letter in the set A-Za-z,
followed by zero or more hyphens, periods, colons, or word (A-Za-z0-9_)
characters.  This is the set of valid identifiers for the id=... attribute.

>    $PageTitlePattern="[[:upper:]][[:alnum:]]*(?:-[[:alnum:]]+)*";

A page's title (name) consists of an uppercase character ([[:upper:]]), 
followed by zero or more alphanumeric characters ([[:alnum:]]*).
Hyphens can exist in page names, but each hyphen must be immediately
followed by at least one alphanumeric character.

Pm



More information about the pmwiki-users mailing list