Skip to content

Commit

Permalink
docs(gatheredfilter.rst): gathered_filter regex syntax examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alperenkose committed Sep 24, 2024
1 parent ca9ae67 commit 15226e3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/source/gatheredfilter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,31 @@ These all do the same thing, listed from fastest to slowest.
gathered_filter: 'name matches-regex .*?'
Example - Matching a Regex
--------------------------
It is possible to write regex in the following formats;
* Standard regex in single quotation marks(`'`)
* Escaped backslash in double quotation marks(`"`)
* Using folded block scalar followed by a dash (`>-`) without any quotation marks
See examples below which correspond to the same regex:
.. code-block:: yaml
gathered_filter: 'name matches-regex \sPAN\s'
.. code-block:: yaml
gathered_filter: "name matches-regex \\sPAN\\s"
.. code-block:: yaml
gathered_filter: >-
name matches-regex \sPAN\s
Example - Matching a Suffix
---------------------------
Expand Down

0 comments on commit 15226e3

Please sign in to comment.