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:
[[Include(^BlogBase/.*,, to="^----$", sort=descending, items=7, skipitems=7, titlesonly)]] -- show the previous week with titles only
the first (pagename) regex in there is ^BlogBase/.* which translates out to:
^BlogBase => string begins with BlogBase (eg the page whose name is !Blogbase)
/ => std wiki nomenclature for subpage
.* => match any number of any characater
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:
search.txt
The above search will list sub pages of Foo that linked to this page.