Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
regex [2021/03/18 20:06] – created niklas | regex [2021/03/19 08:57] – niklas | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | remove extra attributes to p: | + | ====== Useful regular expressions ====== |
+ | |||
+ | =====Clean paragraph tags===== | ||
+ | Replace | ||
< | < | ||
- | remove span tags: | + | with |
+ | < | ||
+ | =====remove span tags:===== | ||
+ | Replace | ||
< | < | ||
- | **To h4:** | + | with nothing |
+ | |||
+ | =====Remove empty paragraph tags: | ||
+ | Replace | ||
+ | < | ||
+ | with nothing | ||
+ | |||
+ | Replace | ||
+ | < | ||
+ | with nothing | ||
+ | |||
+ | =====Bold paragraphs to h4:===== | ||
+ | Replace | ||
< | < | ||
< | < | ||
< | < | ||
- | Replace with: | + | With: |
< | < | ||
< | < | ||
</ | </ | ||
- | **Remove empty p tags:** | + | =====Handling footnotes:===== |
- | < | + | |
- | **Handling footnotes:** | + | |
< | < | ||
<a (href="# | <a (href="# | ||
Line 34: | Line 50: | ||
\1< | \1< | ||
</ | </ | ||
- | **Finding and replacing double quotation:** | + | =====Finding and replacing double quotation:===== |
< | < | ||
(?< | (?< | ||
Line 44: | Line 60: | ||
< | < | ||
+ | |||
+ | =====Removing line breaks in code:===== | ||
+ | This is useful if above isn't working because of line breaks. | ||
+ | Replace | ||
+ | < | ||
+ | with | ||
+ | < | ||
+ | Replace | ||
+ | < | ||
+ | with | ||
+ | < |