[Home]LinkPattern

UseModWiki | RecentChanges | Preferences

Here is the current LinkPattern code (November 14, 1999):

|# LinkPattern definition(s)

 # With Umlauts:
 $cap_let = "[A-Z]";
 $low_let = "[a-z]";
 $any_let = "[A-Za-z_0-9]";
 # Without Umlauts:
 # $cap_let = "[A-Z]";
 # $low_let = "[a-z]";
 # $any_let = "[A-Za-z_0-9]";

 # Simple pattern: Only one lowercase letter required between caps.
 $lp_a = $cap_let . "+" . $low_let . "+" . $cap_let . $any_let . "*";
 # Even simpler: start with caps, then one lowercase letter
 $lp_b = $cap_let . "+" . $low_let . "+" . $any_let . "*";

 if ($use_subpage) {
   # Strict pattern: both sides must be Wiki names
   #  $LinkPattern = "((($lp_a)?\\/)?$lp_a)";
   # Loose pattern: If subpage is used, subpage may be simple name
   $LinkPattern = "((($lp_a)?\\/$lp_b)|$lp_a)";
 } else {
   $LinkPattern = "($lp_a)";
 }


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited February 15, 2008 7:26 pm by MarkusLude (diff)
Search: