http://www.perlmonks.org?node_id=946574


in reply to Re: XML tag closing (naive way)
in thread XML tag closing

i got the solution tye,and its working properly

if($line =~ /(<book-part[^>]*>)((?:(?!<book-part[^>]*>).)*)(?=<book-pa +rt[^>]*>|$)/sgi) { $line .="</book-part>\n"; }