Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/awelzel/265-default-on-tab…
Browse files Browse the repository at this point in the history
…le-pattern-string-matching'

* origin/topic/awelzel/265-default-on-table-pattern-string-matching:
  types: Document ignored &default for table[pattern] string matching
  • Loading branch information
timwoj committed Jul 29, 2024
2 parents 209d1c9 + 079ac2e commit 9eeee6b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions script-reference/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9eeee6b

Please sign in to comment.