NEWS: Add small table[pattern] section

This commit is contained in:
Arne Welzel 2023-11-14 13:08:01 +01:00
parent c113b9b297
commit 96a0312ad2

20
NEWS
View file

@ -16,6 +16,26 @@ Breaking Changes
New Functionality
-----------------
- The table type was extended to allow parallel regular expression matching
when a table's index is a pattern. Indexing such tables yields a vector
containing all values of matching patterns for key of type string.
As an example, the following snippet outputs ``[a, a or b], [a or b]``.
global tbl: table[pattern] of string;
tbl[/a/] = "a";
tbl[/a|b/] = "a or b";
tbl[/c/] = "c";
print tbl["a"], tbl["b"];
Depending on the patterns and input data used for matching, memory growth may
be observed over time as the underlying DFA is constructed lazily. Users are
advised to test their scripts with realistic and adversarial input data with
focus on memory growth. The DFA's state can be reset by removal/addition
of a single pattern. For observability, a new bif ``table_pattern_matcher_stats()``
can be used to gather ``MatcherStats``.
Changed Functionality
---------------------