\s+any whitespace character, repeated at least once
\S+any non-whitespace character, repeated at least once
\s+any whitespace character, repeated at least once
IF:the literal text IF: (case sensitive) .+?any character (except for line terminators), repeated at least once
(?s)applies the following effective flags to the remainder of the pattern: gms s modifier: single line. Allows a dot to match line terminators
.+?any character, repeated at least once
\s+any whitespace character, repeated at least once
\1the text saved by group 1
\s+any whitespace character, repeated at least once
ENDIFthe literal text ENDIF (case sensitive) \s+any whitespace character, repeated at least once
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