Note from 5 December 2022
I always forget how to extract the content of matching HTML tags with a REGEX, so here it is:
content.match(/<pre>(((?!<\/pre>).)*)<\/pre>/gs)
It uses negative lookahead.
(I know I should use the DOM API instead… 🤷♂️)
-
older note:
Note from 30 November 2022 -
newer note:
Note from 12 December 2022