<the literal < (6010 / 748 / 3C16)
Group tagName(?<tagName>\w+) \w+any word character, repeated at least once
>the literal > (6210 / 768 / 3E16)
.+?any character, repeated at least once
>the literal > (6210 / 768 / 3E16)
?repeats the group contents below at most once:
.+?any character, repeated at least once
<the literal < (6010 / 748 / 3C16)
\/the literal / (4710 / 578 / 2F16)
\k<tagName>the text saved by group tagName
>the literal > (6210 / 768 / 3E16)
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
g modifier: global. Finds all matches instead of stopping after the first
s modifier: single line. Allows a dot to match line terminators