User:Xenwolf/Regex snippets

From Xenharmonic Wiki
Jump to: navigation, search

These are regular expressions I use in Notepad++, they are also usable in Perl.

Pattern to Find Replace by Purpose
\|\s*([^|]+?)\s*> {{Monzo|\1}} replace inline-monzos in tables
^\| \| | remove empty styling from table cells
\[\[([\d/]+)\|\1\]\] [[\1]] simplify links to interval pages
<span style="font-size: 70%; vertical-align: super;">(\d+)</span> <sup>\1</sup> simplify superscript for exponents