in reply to Re^6: Regex problem while parsing tagged, hierarchical datain thread Regex problem while parsing tagged, hierarchical data
perl -pi -e '/l1(\sid=.*)>/?$a=$1:s;l2>;l2$a>;' input
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (325 votes). Check out past polls.