Comment: This tag is the start of the paragraph
<p>the literal text <p> (case sensitive) Comment: This lookahead makes sure paragraph isn't an empty line. Needs it.
Negative Lookahead(?![\n|<]) \na line-feed (newline) character (ASCII 10)
|the literal | (12410 / 1748 / 7C16)
<the literal < (6010 / 748 / 3C16)
Comment: This group captures the paragraph.
.{0,500}?any Unicode character, repeated between 0 and 500 times
Comment: This negative lookahead/custom character class prevents <tags>
Negative Lookahead(?![^<][\s]|[\w]+[^>]) Negated Character Class[^<] <the literal < (6010 / 748 / 3C16)
\sa Unicode whitespace character
+matches at least one character from the set below:
\wa Unicode word character
Negated Character Class[^>] >the literal > (6210 / 768 / 3E16)
Comment: This tag is the end of the paragraph
</p>the literal text </p> (case sensitive) Comment: This lookahead makes sure the paragraph ends at the end of the line.
Positive Lookahead(?=\n|<div|<p>) \na line-feed (newline) character (ASCII 10)
<divthe literal text <div (case sensitive) <p>the literal text <p> (case sensitive) g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
s modifier: single line. Allows a dot to match line terminators