The set of regexes currently exported by
TWiki::Func::getRegularExpression is unreasonably limited. You can currently only legally get a few character classes and the wikiword RE. There is a clear need to export other REs for plugins. The proposal here is to change the set of exported REs as follows. The
italicised ones are new:
| Name |
Matches |
Type |
| upperAlpha |
Upper case characters |
String |
| upperAlphaNum |
Upper case characters and digits |
String |
| lowerAlpha |
Lower case characters |
String |
| lowerAlphaNum |
Lower case characters and digits |
String |
| numeric |
Digits |
String |
| mixedAlpha |
Alphabetic characters |
String |
| mixedAlphaNum |
Alphanumeric characters |
String |
| wikiWordRegex |
WikiWords |
RE |
| webNameRegex |
User web names |
RE |
| anchorRegex |
#Anchor_Names |
RE |
| abbrevRegex |
Abbreviations e.g. GOV, IRS |
RE |
| emailAddrRegex |
email@addressPLEASENOSPAM.com |
RE |
Rationale: these are all either useful for internationalisation, or or valid TWiki concepts that are already documented and are reasonable to export. Several
are already unofficially used by plugins.
Done in
DevelopBranch r3730
--
CrawfordCurrie - 04 Mar 2005
Thanks Crawford, sensible enhancement
--
PeterThoeny - 06 Mar 2005
Added
| tagNameRegex |
Standard tag names e.g. %THIS_BIT% (THIS_BIT only) |
RE |
--
CrawfordCurrie - 26 Apr 2005