Re: Batch Editing in Dokuwiki #edit #regexp

Tom H

Buoyed by my success, I then went on to see if I could delete all the "Table of Content" sections that came from the Wikispaces ToC widget. They are badly rendered in Dokuwiki, are static and aren't needed because the Dokuwiki template includes a dynamic ToC on every page. Fortunately, I had used the widget on only some 30 of the 265 pages so, if I could come up with a reliable search expression, BatchEdit could take care of it for me without too much clicking of checkboxes and a darned sight faster than editing each page.

The magical search term is "/====== Table of Contents ======\n(\[\[#[^\]]+\]\]){0,}/" sans quotes.
The replace term is just the empty field.

The same expression without the quotes and forward slashes also works in Notepad++ on the Dokuwiki export; this may be the better place to strip out the static ToC in case your migration has to be repeated.



Join to automatically receive all group messages.