|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re^5: Regex problem while parsing tagged, hierarchical databy smokemachine (Hermit) |
| on Sep 19, 2006 at 09:14 UTC ( [id://573708]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
perl -pi -e '/(<level(1|2))( id=\".*\")*>/;$&?$2==1?$b=$3:$_=~s;($1);$1$b;g:1' input
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||