OSSEC的正则表达式语法
来源:互联网 发布:淘宝人生有声小说 编辑:程序博客网 时间:2024/06/11 20:43
正则表达式语法 Regular Expression Syntax
http://www.ossec.net/doc/syntax/regex.html
目前OSSEC支持两种:
- OR_Regex or regex
- OS_Match or sregex
1) OR_Regex or regex:C中简单快速的正则表达式库。
表达式 Supported expressions:
\w -> A-Z, a-z, 0-9 characters
\d -> 0-9 characters
\s -> For spaces " "
\t -> For tabs.
\p -> ()*+,-.:;<=>?[] (punctuation characters)
\W -> For anything not \w
\D -> For anything not \d
\S -> For anything not \s
\. -> For anything
修饰符 Modifiers:
+ -> To match one or more times (eg \w+ or \d+)
* -> To match zero or more times (eg \w* or \p*)
特殊字符 Special Characters:
^ -> To specify the beginning of the text.
$ -> To specify the end of the text.
| -> To create an "OR" between multiple patterns.
Characters Escaping
To utilize the following characters they must be escaped:
$ -> \$
( -> \(
) -> \)
\ -> \\
| -> \|
2) OS_Match or sregex:比上一种更快,但只支持简单的字符串匹配和一些特殊字符。
特殊字符 Special Characters:
^ -> To specify the beginning of the text.
$ -> To specify the end of the text.
| -> To create an "OR" between multiple patterns.
- OSSEC的正则表达式语法
- OSSEC的rules语法
- OSSEC的decoder语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的语法
- 正则表达式的基本语法
- 正则表达式的基本语法
- 正则表达式的基本语法
- 正则表达式的基本语法
- 正则表达式的语法规则
- 正则表达式的基本语法
- 正则表达式的基本语法
- 正则表达式的基本语法
- [Android]构建boot.img(一):root目录与ramdisk.img的生成
- 图解 Cisco IOS 命名规范
- C++ 关于声明,定义,类的定义,头文件作用,防止头文件在同一个编译单元重复引用,不具名空间
- 键盘监控分析
- [Android]构建boot.img(二):kernel的拷贝与打
- OSSEC的正则表达式语法
- [Android]构建boot.img(三):boot.img的生成与结构
- 1.使用java.net.URL类访问网络数据
- thinking in life
- 在Windows7安装CygWin失败
- 算法时间复杂度的计算 [整理]
- TCP UDP select超时总结
- Android动画开发——Animation动画效果
- Telechips快速编译system.img和boot.img的方法