String matcher

type.matcher.v3.StringMatcher

[type.matcher.v3.StringMatcher proto]

Specifies the way to match a string.

  1. {
  2. "exact": "...",
  3. "prefix": "...",
  4. "suffix": "...",
  5. "safe_regex": "{...}",
  6. "contains": "...",
  7. "ignore_case": "..."
  8. }

exact

(string) The input string must match exactly the string specified here.

Examples:

  • abc only matches the value abc.

Precisely one of exact, prefix, suffix, safe_regex, contains must be set.

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 exact, prefix, suffix, safe_regex, contains must be set.

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 exact, prefix, suffix, safe_regex, contains must be set.

safe_regex

(type.matcher.v3.RegexMatcher) The input string must match the regular expression specified here.

Precisely one of exact, prefix, suffix, safe_regex, contains must be set.

contains

(string) The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead.

Examples:

  • abc matches the value xyz.abc.def

Precisely one of exact, prefix, suffix, safe_regex, contains must be set.

ignore_case

(bool) If true, indicates the exact/prefix/suffix/contains 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.

type.matcher.v3.ListStringMatcher

[type.matcher.v3.ListStringMatcher proto]

Specifies a list of ways to match a string.

  1. {
  2. "patterns": []
  3. }

patterns

(repeated type.matcher.v3.StringMatcher, REQUIRED)