in reply to Re^3: Regex problem while parsing tagged, hierarchical data
in thread Regex problem while parsing tagged, hierarchical data
Ups !! -1 char
Mago
mago@rio.pm.org
perl -pi -e '/(<level(1|2))(\sid=\".*\")*>/;$&?$2==1?$b=$3:$_=~s;($1); +$1$b;g:1' input
Mago
mago@rio.pm.org
In Section
Seekers of Perl Wisdom