http://t.zoukankan.com/faberbeta-p-linux-shell033.html
一般匹配
最小最长匹配
https://blog.csdn.net/weixin_50034171/article/details/110202089
#*:删除左边第一个匹配
##*:删除左边所有匹配
%*:删除右边第一个匹配
%%*:删除右边所有匹配
正则匹配
https://www.cnblogs.com/hanxiaoyu/p/5759477.html
- ip匹配
grep -E -o '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'
0 条评论