Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: Document ignored &default for table[pattern] string matching #266

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading