.. _envoy_api_file_envoy/type/matcher/string.proto: StringMatcher ============= .. _envoy_api_msg_type.matcher.StringMatcher: type.matcher.StringMatcher -------------------------- `[type.matcher.StringMatcher proto] `_ Specifies the way to match a string. .. code-block:: json { "exact": "...", "prefix": "...", "suffix": "...", "regex": "...", "safe_regex": "{...}", "ignore_case": "..." } .. _envoy_api_field_type.matcher.StringMatcher.exact: exact (`string `_) The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*. Precisely one of :ref:`exact `, :ref:`prefix `, :ref:`suffix `, :ref:`regex `, :ref:`safe_regex ` must be set. .. _envoy_api_field_type.matcher.StringMatcher.prefix: prefix (`string `_) The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz* Precisely one of :ref:`exact `, :ref:`prefix `, :ref:`suffix `, :ref:`regex `, :ref:`safe_regex ` must be set. .. _envoy_api_field_type.matcher.StringMatcher.suffix: suffix (`string `_) The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc* Precisely one of :ref:`exact `, :ref:`prefix `, :ref:`suffix `, :ref:`regex `, :ref:`safe_regex ` must be set. .. _envoy_api_field_type.matcher.StringMatcher.regex: regex (`string `_) The input string must match the regular expression specified here. The regex grammar is defined `here `_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases. Precisely one of :ref:`exact `, :ref:`prefix `, :ref:`suffix `, :ref:`regex `, :ref:`safe_regex ` must be set. .. _envoy_api_field_type.matcher.StringMatcher.safe_regex: safe_regex (:ref:`type.matcher.RegexMatcher `) The input string must match the regular expression specified here. Precisely one of :ref:`exact `, :ref:`prefix `, :ref:`suffix `, :ref:`regex `, :ref:`safe_regex ` must be set. .. _envoy_api_field_type.matcher.StringMatcher.ignore_case: ignore_case (`bool `_) If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher *data* will match both input string *Data* and *data* if set to true. .. _envoy_api_msg_type.matcher.ListStringMatcher: type.matcher.ListStringMatcher ------------------------------ `[type.matcher.ListStringMatcher proto] `_ Specifies a list of ways to match a string. .. code-block:: json { "patterns": [] } .. _envoy_api_field_type.matcher.ListStringMatcher.patterns: patterns (:ref:`type.matcher.StringMatcher `, *REQUIRED*)