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… 🤷♂️)
There is only one content with this tag:
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… 🤷♂️)
See all tags.