perl -pi -e '/l1(\sid=.*)>/?$a=$1:s;l2>;l2$a>;' input
In reply to Re^7: Regex problem while parsing tagged, hierarchical data
by Mago
in thread Regex problem while parsing tagged, hierarchical data
by sivaramanm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |