SourceForge.net Logo
May 16, 2006
GPL
ProWikiCenter
Regular Expression

RegularExpressions are a special kind of text search commands. They are used in many places in ProWiki and - because ProWiki is written in Perl - the RegularExpressions are used in the Perl flavour.

special commandsmeaningmatchesdoesn't match
.any characteralmost everythingend of line "\n"
A*zero, one or more A"", "A" or "AAAA""B", almost everything else
.*something in between"asghas"matches everything
A.*BA and B and something in between"Alligator Berni" or "AB""AC"
x+one or more "x""x", "xx" or "xxxx""" or "alpha"
\da digit"1" or "6""xyz"
\swhitespace" " or "\t""abc"
[ABD]one of the characters between brackets"A", "B" or "D""C"
[a-z]+one or more lower case characters"alpha" or "butter""ALPHA"
(alpha|beta|gamma)one of the words "alpha", "beta" or "gamma""alpha""berta"
^beginning of line  
^A a line starting with "A"a line starting with any other character
$end of line  
)$ right parenthesis at the end of lineany other character at the end of line
^.{10}$ a line exactly 10 characters longany other line length

RegularExpressions can become arbitrarily complex. There are tutorials and books on this topic. This is just to give you a taste of it.


FolderGlossary