之间的连接状态我以前grep
命令file.xml <cite> </cite>
之间解压的一切:使用bash到标签
grep -Po "(?<=<cite>).*?(?=</cite>)" /tmp/file.xml
的结果是这样的:
<strong>site.com</strong>/<strong>blahblah</strong>/foo #and may be with more tags named strong
<strong>site2.com</strong>/req/?<strong>blahblah2</strong>=foo
现在我想有结果是这样的:
site.com/blahblah/foo
site2.com/req/?blahblah2=foo
我想删除添加<strong>
个</strong>
并附加其他...
如果在蟒蛇这也欢迎大家使用xpath
的方式...