User:Xenwolf/Regex snippets: Difference between revisions

Xenwolf (talk | contribs)
add another way to present (=hard-code) superscript instead of using the proper tag, generalize both patterns
ArrowHead294 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
These are regular expressions I use in Notepad++, they are also usable in [[Perl]].
These are regular expressions I use in Notepad++, they are also usable in {{w|Perl}}.


{| class="wikitable"
{| class="wikitable"
! width="56%" | Pattern to Find
|-
! width="14%" | Replace by
! style="width: 50%;" | Pattern to Find
! style="width: 14%;" | Replace by
! Purpose
! Purpose
|-
|-
Line 26: Line 27:
| proper superscript
| proper superscript
|-
|-
| <code><nowiki><font style="vertical-align:super;font-size:0.\dem;">(.+)</font>
| <code><nowiki><font style="vertical-align:super;font-size:0.\dem;">(.+)</font></nowiki></code>
| <code><nowiki><sup>\1</sup></nowiki></code>
| <code><nowiki><sup>\1</sup></nowiki></code>
| proper superscript
| proper superscript
Line 53: Line 54:
| <code><nowiki><\1>\2</\1></nowiki></code>
| <code><nowiki><\1>\2</\1></nowiki></code>
| simplify super- and subscript
| simplify super- and subscript
|-
| <code><nowiki>(\d+),(\d+)</nowiki></code>
| <code><nowiki>\1.\2</nowiki></code>
| replace decimal comma by decimal point
|-
|-
| <code><nowiki></nowiki></code>
| <code><nowiki></nowiki></code>
Line 58: Line 63:
| description
| description
|}
|}
[[Category:Regular expressions]]