Just before giving up I found it!
I needed to limit both '.*' to the smallest match '.*?':
$body =~ /<tag1>\[(\w+)\]<\/tag1>.*?<tag2>(.*?)<\/tag2>/gsWith the '?' pattern matching quantifier in combination with 's' modifier it will get strings with multiple lines
Took me a few hours but that's the r.e. learning curve ;-)In reply to Re: Regular expression for grabbing strings with multiple lines between tags
by Max_NL
in thread Regular expression for grabbing strings with multiple lines between tags
by Max_NL
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |