Can you please help on matching a pattern having potential linebreaks.
On [PHPRegexLive](https://www.phpliveregex.com/), I use the regex pattern = {{\s*IF(.+)}}(.+){{\s*ENDIF}} on search string:
before if....{{IF !empty('')}} <div class='h6 mt-4 mb-2 edit-btn-container'>About</div> {{ENDIF}} after if....
The result is fine, array[0] = entire {{IF <condition>}}...{{ENDIF}} string, array[1] = <condition>, and array[2] = whatever between {{IF <con>}} and {{ENDIF}}.
The problem is when the entire {{IF <con>}}...{{ENDIF}} spans more than one line, such as
before if....{{IF !empty('')}}
<div class='h6 mt-4 mb-2 edit-btn-container'>About</div>
{{ENDIF}} after if....
I tried different combinations of \n*, \n*\r*, etc, and s, m modifier but cannot get it to work.
On [PHPRegexLive](https://www.phpliveregex.com/), I use the regex pattern = {{\s*IF(.+)}}(.+){{\s*ENDIF}} on search string:
before if....{{IF !empty('')}} <div class='h6 mt-4 mb-2 edit-btn-container'>About</div> {{ENDIF}} after if....
The result is fine, array[0] = entire {{IF <condition>}}...{{ENDIF}} string, array[1] = <condition>, and array[2] = whatever between {{IF <con>}} and {{ENDIF}}.
The problem is when the entire {{IF <con>}}...{{ENDIF}} spans more than one line, such as
before if....{{IF !empty('')}}
<div class='h6 mt-4 mb-2 edit-btn-container'>About</div>
{{ENDIF}} after if....
I tried different combinations of \n*, \n*\r*, etc, and s, m modifier but cannot get it to work.
