User:SmallJarsWithGreenLabels/regexes for language templating

Italics to transliterations
Find

Replace

Notes:
 * Must be replaced one by one so that non-transliterations can be skipped.
 * Does not match bolded italics

Bold italics to transliterations
Find

Replace

Hanzi to zh
Find

Replace All

Notes:
 * After replacing, search through all instances of , making sure to detemplate any in ref names, file names, links, or other language templates
 * Not a worthwhile method on articles that heavily mix different CJKV scripts

Japanese
Find

Replace All

Notes: (as above)
 * After replacing, search through all instances of , making sure to detemplate any in ref names, file names, links, or other language templates
 * Not a worthwhile method on articles that heavily mix different CJKV scripts

Merge neighbouring lang templates
The commands above can cause a sentence written in one language to be split into multiple templates by spaces. Apply the following command to re-merge separated language templates:

Find

Replace All × n

Notes:
 * Continue applying until there are zero matches