mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00

Operates similar to find_all(), except returns a vector instead of set to allow preservation of order/duplicates.
19 lines
458 B
Text
19 lines
458 B
Text
# @TEST-EXEC: zeek -b %INPUT >out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
event zeek_init()
|
|
{
|
|
local v = vector("this is a test",
|
|
"one two three four one two three four",
|
|
"this is a test test test",
|
|
"1 2 3 4",
|
|
"a b",
|
|
"foo",
|
|
"1bar2foo3",
|
|
""
|
|
);
|
|
local pat = /[a-z]+/;
|
|
|
|
for ( i in v )
|
|
print find_all_ordered(v[i], pat);
|
|
}
|