^start of line
artthe literal text art (case sensitive) Non-Capturing Group(?:\r?\n(?!art-|\s*code:"XXX").*)* *repeats the group contents below any number of times:
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
Negative Lookahead(?!art-|\s*code:"XXX") art-the literal text art- (case sensitive) 2nd Alternative\s*code:"XXX" \s*any whitespace character, repeated any number of times
code:"XXX"the literal text code:"XXX" (case sensitive) .*any character (except for line terminators), repeated any number of times
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
\s*any whitespace character, repeated any number of times
code:"XXX"the literal text code:"XXX" (case sensitive) Non-Capturing Group(?:\r?\n(?!art-).*)* *repeats the group contents below any number of times:
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
Negative Lookahead(?!art-) art-the literal text art- (case sensitive) .*any character (except for line terminators), repeated any number of times
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
art-the literal text art- (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