Regexpindex Action Documentation
Not included in official Wikka versionSee also:
Development: RegexpindexActionDocumentation
Short description
Displays the list of wiki pages whose tag matches a given regular expression.Parameters
name | type | required? | default | description |
---|---|---|---|---|
re | string | required | The regular expression to match the page tag against | |
cat | string | optional | Category filter: only pages belonging to the specified category are displayed | |
sort | string | optional | tag | 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) |
opts | string | optional | Options: any combination of 'o' (display owner) and 't' (display page title) |
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.
Usage
{{regexpindex re="myregexp" [cat="CategoryWiki"] [sort="time"] [opts="t"]}}
Notes
- 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)
Example
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
FootnoteAction*
FootnoteActionInfo*
Author
DomBonjCategoryDocumentation