ngrep如何使匹配表达式不区分大小写?

时间:2015-06-25 09:31:11

标签: regex linux bash shell grep

从手册页引用

match expression
A  match  expression  is either an extended regular expression, or if the -X
option is specified, a string signifying a hexadecimal value.   An  extended
regular  expression  follows  the  rules  as  implemented  by  the GNU regex
library.  Hexadecimal expressions can optionally be preceded by `0x'.  E.g.,
`DEADBEEF', `0xDEADBEEF'.

对于(e)grep,我使用-i,但是如何写一个不区分大小写的ngrep匹配表达式?

e.g。

sudo ngrep -xqtd lo0 select port 3306

不匹配mysql --protocol=tcp -e "Select 1"

1 个答案:

答案 0 :(得分:1)

正如man page中所述,您拥有<Button Content="Row 1 Text &#xa; Row 2 Text"/> 选项:

  

<强> -i

     

执行不区分大小写的搜索。