Solved: Find multilined strings with RegExpFind

i'm trying to find content between given HTML tags. Regex i use, works like a charm in Notepad++ - but not in STFE. This is the regex:

<\s*form[^>]*>(.*?)<\s*/\s*form>

How should i edit this regex to find multiple line content between tags?

Can you try to specify the first group of the regex? See below:

Your example is wrong. This formula is working only with one line:

Having in A1 <form foo>bar</form>
the formula =Dump(RegExpFind(a1;"<\s*form[^>]*>(.*?)<\s*/\s*form>";1)) finds bar.

Having in A1 <form foo>bar\r\nbaz\r\nbom</form>
the same formula finds nothing.

This is pretty weird, because the same formula finds multilined strings in Notepad++.

Correct Solution

=Dump(RegExpFind(A1;"(?s)<\s*form[^>]*>(.*?)<\s*/\s*form>";1))
2 Likes