From 079ac2e9e285437b13ef550815018e3f04e5d290 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 25 Jul 2024 09:45:26 +0200 Subject: [PATCH] types: Document ignored &default for table[pattern] string matching Closes #265 --- script-reference/types.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script-reference/types.rst b/script-reference/types.rst index 3096ba98d..de038fd50 100644 --- a/script-reference/types.rst +++ b/script-reference/types.rst @@ -1167,6 +1167,15 @@ the entire string. If you want the pattern to match if it's *anywhere* in the string, you can use the usual regular expression operators such as ``/.*foo.*/``. +.. note:: + + The :zeek:attr:`&default` attribute is ignored for this type of lookup. + If none of the patterns matches a given string, the result will be an empty + :zeek:type:`vector`, regardless of :zeek:attr:`&default`. Neither is the + :zeek:attr:`&default_insert` attribute used. It's not an error to have + either of these attributes, however. They'll still be in effect when + indexing with :zeek:type:`pattern` values. + .. note:: Internally, Zeek matches a table's patterns in parallel using a lazily