HelpOnRegex

regex is short for Regular Expression. The term is used throughout MoinMoin, especially the parameters given to various Macros and Actions. (see HelpOnMacros/Include ). Until this page, there doesnt seem to be much explaination of this term. Those steeped in computer science lore know these things, but for the uninitiated it is a complete unknown.

A Regular Expression is a string that is used to describe or match a set of strings, according to certain syntax rules. They are widely used in computer systems.

MoinMoin uses the Python re package to implement its regular expressions. For more information on this see:

It would be nice if there were some MoinMoin specific examples here. There are some on HelpOnMacros/Include such as:

the first (pagename) regex in there is ^BlogBase/.* which translates out to:


Question: is there some regex that says match the current page, without explicitly knowing the page's name when you create the macro/action? -- JerryIsdale 2007-08-03 23:47:42

You can use @PAGE@ variable, that will be expanded to the current page name after saving. For example:

   1 {{{
   2 [[FullSearch(linkto:@PAGE@ title:regex:^Foo/)]]
   3 }}}
search.txt

The above search will list sub pages of Foo that linked to this page.

MoinMoin: HelpOnRegex (last edited 2015-07-01 14:22:15 by 161)