RegExp get string inside string
Let presume we have something like this: <div1> <h1>text1</h1> <h1>text2</h1> </div1> <div2> <h1>text3</h1> </div2> Using RegExp we need to get text1 and text2 but not text3. How to do this? Thanks in advance. EDIT: This is just an example. The text I'm parsing could be just plain text. The main thing I want to accompli...