Anonymous

Guidelines:Pywikibot: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
Line 146: Line 146:
Here <code>a</code> would be replaced with <code>b</code> and <code>c</code> would be replaced with <code>d</code>.
Here <code>a</code> would be replaced with <code>b</code> and <code>c</code> would be replaced with <code>d</code>.


This command supports regex with the <code>-regex</code> option. Escape special regex characters with a backslash. For example, <code>\|</code> will match pipe characters. Failing to escape pipe characters when using regex replacements can be quite disastrous.  
This command supports regex with the <code>-regex</code> option. Escape special regex characters with a backslash. For example, to match wiki pipe characters you must type <code>\|</code>. Failing to escape pipe characters when using regex replacements can be disastrous given how regex pipes widen matches, often by quite a lot.  


The script will show you each edit and ask you to confirm before saving each page. At any point you can tell it to save the rest of the pages without confirmation.
The script will show you each edit and ask you to confirm before saving each page. At any point you can tell it to save the rest of the pages without confirmation.