^start of string
.*any character, repeated any number of times
\Kresets the starting point of the reported match. Any previously consumed characters are no longer included in the final match
<pthe literal text <p (case sensitive) .*?any character, repeated any number of times
</p>the literal text </p> (case sensitive) s modifier: single line. Allows a dot to match line terminators