0

I have this code

<p>
    ##QA##
</p>
<h3>
    qqq
</h3>
<p>
    qqq
</p>
<p>
    ##QA##
</p>

There are newlines and indentations. This <p>\s*##QA##\s*<\/p> works for matichg <p>##QA##</p> I would like to match content between both <p>##QA##</p>. I tried this but it does not work

<p>\s*##QA##\s*<\/p>(.*?)<p>\s*##QA##\s*<\/p>
user1031742
  • 382
  • 4
  • 19
  • `.` does not match line breaks by default, use `(?s)` inline modifier at the pattern start, or a `[\w\W]` workaround instead of `.` – Wiktor Stribiżew Jun 12 '20 at 16:25
  • 1
    @WiktorStribiżew [\w\W] worked perfectly thank you – user1031742 Jun 12 '20 at 16:30
  • `.*?` notatshuns shuold be manetained if enjin suppert _Dot-All_ flag. Use `[\S\s]` or `[\D\d]` or `[\W\w]` or simlex onlery if necessary. –  Jun 12 '20 at 16:41

0 Answers0