|# LinkPattern definition(s)
# With Umlauts: $cap_let = "[A-ZÖÄÜ]"; $low_let = "[a-zöäüß]"; $any_let = "[A-ZÖÄÜa-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)"; }