User:469Bot/Regex

For future reference, the following regex search and replace jobs were done using AutoWikiBrowser.

Remove links from template parameter
Find: \|\s*type(\s*)= \[\[(.*?)\]\] Replace: | type$1= $2

Empty template parameter
Find: \|(\s*)attrib(\s*)=(\s*)(.*?)\n Replace: |$1attrib$2=$3\n

Add template parameter at specific position
Find: \|(\s*)name(\s*)=(\s*)(.*?)\n Replace: |$1name$2=$3$4\n|$1article       =$3\n If (not contains): (\|(\s*)article)

Remove redundant pipe character (start)
Find: | Replace: Note: no regular expressions checked

Remove redundant pipe character (end)
Find: \n\|}} Replace: \n}}

Replace old lists by new lists
This consists of three regexes:

List header
Find: \{\{(Template|)(:|)Infobox Creature/List/Header\|(.*?)}} Replace: {{CreatureList|type=List/Sorted|caption=$3

List item
Find: \{\{:(.*?)\|(L|l)ist}} Replace: |$1

List footer
Find: \n

(this gives a small error if the page ends with a creaturelist and no line break)