Wiki source for RegexpindexActionInfo

Show raw source

=====""Regexpindex"" Action Documentation=====
//Not included in official Wikka version//

>>==See also:==
Development: RegexpindexAction>>This is the documentation page for the Regexpindex action.::c::

==Short description==
Displays the list of wiki pages whose tag matches a given regular expression.

""<table cellspacing="0" cellpadding="2" border="1">
<tr><th scope="col">name</th><th scope="col">type</th><th scope="col">required?</th><th scope="col">default</th><th scope="col">description</th></tr>
<tr><td>re</td><td>string</td><td>required</td><td></td><td>The regular expression to match the page tag against</td></tr>
<tr><td>cat</td><td>string</td><td>optional</td><td></td><td>Category filter: only pages belonging to the specified category are displayed</td></tr>
<tr><td>sort</td><td>string</td><td>optional</td><td>tag</td><td>Sort order of selected pages. Allowed values are 'tag' (sort on page tag), 'time' (sort on timestamp of last update, oldest first) and 'rtime' (sort on timestamp of last update, most recent first)</td></tr>
<tr><td>opts</td><td>string</td><td>optional</td><td></td><td>Options: any combination of 'o' (display owner) and 't' (display page title)</td></tr>

==Long description==
This action displays an index of all the wiki's pages whose tag matches the characters pattern passed as the 're' parameter, using the regular expressions pattern matching technique. The regular expression string shall comply with the POSIX syntax.

An additional filtering possibility is to select only pages belonging to a given category by using the 'cat' parameter.
The layout and the sort order of the displayed pages list are controlled with the 'sort' and 'opts' parameters.


%%{{regexpindex re="myregexp" [cat="CategoryWiki"] [sort="time"] [opts="t"]}}%%

~- regular expressions are a powerful but advanced tool which can be at times frustrating. Interested readers can refer to [[ | this tutorial]]
~- the action relies on the REGEXP function of ""MySQL"". Any odd behaviour should be checked against the [[ | corresponding documentation]]
~- no pattern delimiters are needed for the regular expression string (see example below)

__Displaying all pages whose name starts with a 'F' followed by 2 vowels:__
%%{{regexpindex re="^F[aeiouy]{2}" opts="o"}}%%
will return a list similar to:

FeedbackAction . . . . Owner: DarTar
FeedbackActionUpgrade . . . . Owner: DarTar


Valid XHTML :: Valid CSS: :: Powered by WikkaWiki