Hi:

Given the following list:
<elem1>
<elema></elema>
<elemb>
<elemc></elemc>
</elemb>
</elem1>

I  want to know all the "elements" within elem1. (Note: It is seriously 
MALFORMED XML, that is why I am attempting to use regexp).

Any ideas. I can get $1 equal to contents of elem1. But after that, somewhat 
lost.
 perl -e '$line = 
"<elem1><elema></elema><elemb><elemc></elemc></elemb></elem1>"; $line 
=~/<elem1>(.*)<\/elem1>$/; print $1'

My regex to retrieve "inner tags" is likely to be something simply like 
<([^<>]*)> ??? 




      

Reply via email to