String matcher (proto)¶
type.matcher.v3.StringMatcher¶
[type.matcher.v3.StringMatcher proto]
Specifies the way to match a string.
{
"exact": ...,
"prefix": ...,
"suffix": ...,
"safe_regex": {...},
"contains": ...,
"ignore_case": ...
}
- exact
(string) The input string must match exactly the string specified here.
Examples:
abc
only matches the valueabc
.
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 valueabc.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 valuexyz.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 valuexyz.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 stringData
anddata
if set to true.
type.matcher.v3.ListStringMatcher¶
[type.matcher.v3.ListStringMatcher proto]
Specifies a list of ways to match a string.
{
"patterns": []
}
- patterns
(repeated type.matcher.v3.StringMatcher, REQUIRED)