gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:15:21 30 4
gpt4 key购买 nike

引自手册页

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 匹配表达式?

例如

sudo ngrep -xqtd lo0 select port 3306

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

最佳答案

man page 中所读,你有 -i 选项:

-i

Perform a case-insensitive search.

关于regex - ngrep 如何使匹配表达式不区分大小写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31046399/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com