之前提取字符串

时间:2014-10-23 13:17:30

标签: html bash shell

我需要的是先提取字符串

例如在“href ********> System one / a>”中,

我只需输出系统一

请帮帮我。[在此输入链接说明] [1]

1 个答案:

答案 0 :(得分:0)

假设这就是你所需要的:

echo "href********>System one /a>" | sed -r 's/.*>(.*)\/.*/\1/g'

echo "href********>System one </a>" | sed -r 's/.*>(.*)<.*/\1/g'