foreach (@meinarray) { if (/()(.*?)(<\/Buch>)/) { print $2."\n"; }