mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge branch 'set_to_regex-docs' of https://github.com/jlagermann/zeek
- Adjusted the formatting during merge * 'set_to_regex-docs' of https://github.com/jlagermann/zeek: added examples to set_to_regex comments Signed-ff-by: James Lagermann <james.lagermann@corelight.com>
This commit is contained in:
commit
b5531ecbd3
4 changed files with 18 additions and 3 deletions
|
@ -4,7 +4,14 @@ module GLOBAL;
|
|||
|
||||
## Given a pattern as a string with two tildes (~~) contained in it, it will
|
||||
## return a pattern with string set's elements OR'd together where the
|
||||
## double-tilde was given.
|
||||
## double-tilde was given. Examples:
|
||||
##
|
||||
## .. sourcecode:: zeek
|
||||
##
|
||||
## global r1 = set_to_regex(set("a", "b", "c"), "~~");
|
||||
## # r1 = /^?(a|b|c)$?/
|
||||
## global r2 = set_to_regex(set("a.com", "b.com", "c.com"), "\\.(~~)");
|
||||
## # r2 = /^?(\.(a\.com|b\.com|c\.com))$?/
|
||||
##
|
||||
## ss: a set of strings to OR together.
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue