I'm trying to get part of my Reg Exp (pcre flavor) working.
Here's the HTML structure. I want to select both ChildA and ChildB. (ie Match1: From Parent to ChildA; and Match2: From Parent to ChildB).
<Parent>
<ChildA>..</ChildA>
<ChildB>..</ChildB>
I tried
/<parent>(.|\n)*?<child(a|b)>/gmi
I tried with and without the question mark. It selects either up to ChildA or ChildB but not both.
Can anyone guide me please?
Below are the matches I'm trying to get (clarifying as requested by Petr Srníček):
Match 1:
<Parent>
<ChildA>
Match 2:
<Parent>
<ChildA>..</ChildA>
<ChildB>