create new tag
, view all tags

Implemented: New TWiki::Func::getRegularExpression Function to get Predefined Regular Expressions

getRegularExpression( $regexName ) ==> $pattern

Description: Retrieves a TWiki predefined regular expression
Parameter: $regexName Name of the regular expression to retrieve. See notes below
Return: String or precompiled regular expression matching as described below
Since: TWiki::Plugins::VERSION 1.020 (9 Feb 2004)

Notes: TWiki internally precompiles several regular expressions to represent various string entities in an I18N-compatible manner. Plugins are encouraged to use these in matching where appropriate. The following are guaranteed to be present; others may exist, but their use is unsupported and they may be removed in future TWiki versions. Those which are marked "CC" are for use within character classes and may not produce the desired results outside of them.

Name Matches CC
upperAlpha Upper case characters Y
lowerAlpha Lower case characters Y
mixedAlpha Alphabetic characters Y
mixedAlphaNum Alphanumeric charactecs Y
wikiWordRegex WikiWords N


   my $upper = TWiki::Func::getRegularExpression("upperAlpha");
   my $alpha = TWiki::Func::getRegularExpression("mixedAlpha");
   my $capitalized = qr/[$upper][$alpha]+/;

-- RichardDonkin - 09 Feb 2004


Added docs of feature added on 09 Feb 2004 by RichardDonkin.

-- PeterThoeny - 29 Aug 2004

TopicClassification FeatureDone
TopicSummary Plugins: New TWiki::Func::getRegularExpression Function to get Predefined Regular Expressions


AssignedToCore RichardDonkin
ScheduledFor CairoRelease

SpecProgress 100%
ImplProgress 100%
DocProgress 100%
Topic revision: r1 - 2004-08-29 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.