<the literal < (6010 / 748 / 3C16)
\s*any whitespace character, repeated any number of times
brthe literal text br (case insensitive) \s*any whitespace character, repeated any number of times
\/?optionally matches the literal / (4710 / 578 / 2F16)
>the literal > (6210 / 768 / 3E16)
Positive Lookahead(?=.*?(?:(?!<main>)[\s\S])*?<\/main>) .*?any character (except for line terminators), repeated any number of times
Non-Capturing Group(?:(?!<main>)[\s\S])*? *?repeats the group contents below any number of times:
Negative Lookahead(?!<main>) <main>the literal text <main> (case insensitive) \sany whitespace character
\Sany non-whitespace character
<the literal < (6010 / 748 / 3C16)
\/the literal / (4710 / 578 / 2F16)
main>the literal text main> (case insensitive) g modifier: global. Finds all matches instead of stopping after the first
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters