I have some text with the pattern
<i>[ <note>{text}</note>{more text} </i>.
I can find this pattern using
<i>\[ <note>.*</note>.*\] </i>
This works well unless there are more than one matches on a line (I am using BBEdit Grep searching if that helps). So if I have the following text:
This is the beginning of random text. <i>[ <note>i.e., </note>more information] </i>. Another group of text <i>[ <note>i.e., </note>person] </i>continued 2nd text <i>[ <note>i.e., </note>third text] </i>more third text <i>[ <note>i.e., </note>Ending fourth text] </i>. Other information.
The search selects everything from the first < i> element to the last closing < /i> instead of the first closing < \i> element. How do I get it to stop at the first closing < \i> element?