为什么grep匹配模式“\”的所有行? [英] Why does grep match all lines for the pattern "\'"
本文介绍了为什么grep匹配模式“\”的所有行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在这个SO问题中有一些我无法解释的内容:
In this SO question there is something that I cannot explain:
grep "\'" input_file
匹配给定文件中的所有行。 \'
对grep有特殊意义吗?
matches all lines in the given file. Does \'
have a special meaning for grep?
推荐答案
grep正则表达式GNU扩展:'\''匹配整个输入的结尾
grep regex GNU extension: ‘\'’ matches the end of the whole input
这篇关于为什么grep匹配模式“\”的所有行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文