DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:regexreplacer

This is an old revision of the document!


regExReplacer Plugin

Compatible with DokuWiki

Rincewind, maybe more

plugin Replaces text by regular expressions.

Last updated on
2012-01-26

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to replace

Tagged with macro, plugin, regex, replace

Installation

  1. Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
  2. create the config file in the default conf-path

Configuring the Plugin

The Plugin uses the config-file to create syntax_plugins dynamically. The File consists of three columns:

  1. parserPattern
  2. preg_replace search-string
    :!: followed by a tab
  3. preg_replace replacement-string

example config

replaceMLU.conf
# inhaltsverzeichnisse
\@toc\:[^\r\n!]*[!|\r?\n]	\@toc\:([^\r\n!]*)!?	{{topic>${1}}}
# tagcloud
\@cloud[^\r\n]*[\r\n?|\n]	\@cloud([^\r\n]*)	~~TAGCLOUD${1}~~
# no-cache-feature
\@nocache[\r\n?|\n]	\@nocache	~~NOCACHE~~
# set tags
\@tags\:[^\r\n]*[\r\n?|\n]	\@tags\:([^\r\n]*)	{{tag>${1}}}
# include template
\@tpl\:[^\r\n]*[\r\n?|\n] \@tpl\:([^\r\n]*)	{{template>${1}}}@info: Eingebettet aus //[[${1}]]//*
# newpage-helper
\@newpage[\r\n?|\n]	    \@newpage	{{NEWPAGE>}}
\@newpage\:[^\r\n]*[\r\n?|\n]	\@newpage\:([^\r\n]*)	{{NEWPAGE>${1}}}
# workflow easing
\@fixme\:[^\r\n]*[\r\n?|\n]	\@fixme\:([^\r\n]*)	<wrap>FIXME ${1}{{tag>todo fixme}}</wrap>
# simple info-frame
\@info\:[^\r\n]*[\r\n?|\n]	\@info\:([^\r\n]*)	<wrap info>${1}</wrap>
plugin/regexreplacer.1327592833.txt.gz · Last modified: 2012-01-26 16:47 by 141.48.70.171