in reply to Regexp Problem with greedy

I believe this will get what you want:
use strict; use warnings; while ( <DATA> ) { chomp; my @planes = m'<M>((?:[^<]+|<(?!/M(?:\d+)?>)))</M\d+>'gi; my @terms = m'<M>((?:[^<]+|<(?!/M>)))</M>'gi; print "@planes\n"; print "@terms\n"; } __DATA__ America's first <M>swept-wing</M>, <M>multiengine jet</M> <M>bomber</M +> was the <M>B-47 Stratojet</M200>, and the first <M>swept-wing fight +er</M> was the <M>F-86 Sabre Jet</M201>. Both used new swept-wing dat +a found in Germany after <M>World War II</M> and sent back to the Uni +ted States by American scientists. This photograph, from <D>1951</D>, + was taken the first time the two flew together over <PL>Kansas</PL>.

-enlil