You can also read about the Common Regex Gotchas. The first one not only is a piece of advice you should follow, it also uses a problem similar to yours as an example, so you should be able to get your solution from it. The second probably applies to you as well, if you're not going to use a module to validate the whole XML file (meaning you trust the content to be what you expect), you just need to grab the text between </tag1> and <tag2>.
Edit: I may be wrong about the second gotcha though, you probably want to capture the content of the tags as well as what's in between.
In reply to Re: Regular expression for grabbing strings with multiple lines between tags
by Eily
in thread Regular expression for grabbing strings with multiple lines between tags
by Max_NL
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |