180******66
deepin
2018-07-26 01:39 shell正则表达式了解一下
Reply Like 0 View the author
sdf2342" | cut -c5-20
sdf2342" | grep -o 'www.*jpg'https://bbs.deepin.org/post/166561
简单点的,仅针对示例:
echo "sdfdsdf2342" | cut -c5-20
5-20表示截取第5-20位的字符
https://bbs.deepin.org/post/166561
晕,原来论坛有bug啊,会自动去打开文本中的url。。。楼主把中间部分替换成你的url即可。 ...
https://bbs.deepin.org/post/166561
简单点的,仅针对示例:
echo "sdfdsdf2342" | cut -c5-20
5-20表示截取第5-20位的字符
https://bbs.deepin.org/post/166561
aa=$(echo 'dyujiwww.xx.com/aa. jpgh' | awk -F'www' '{ print $2}' | awk -F'jpg' '{print $1}') bb=$(ec ...
myccloves 发表于 2018-7-25 19:14
太复杂了。都看不懂了。
https://bbs.deepin.org/post/166561
我编辑了一下 您只需要吧第一行单引号中内容替换成你的内容就可以了
Popular Ranking
ChangePopular Events
More
我想要提取:
www.xx.com/1.jpg
www.yy.com/2.jpg