RegexMatcher

type.matcher.v3.RegexMatcher

[type.matcher.v3.RegexMatcher proto]

A regex matcher designed for safety when used with untrusted input.

{
  "google_re2": "{...}",
  "regex": "..."
}
google_re2

(type.matcher.v3.RegexMatcher.GoogleRE2, REQUIRED) Google’s RE2 regex engine.

regex

(string, REQUIRED) The regex match string. The string must be supported by the configured engine.

type.matcher.v3.RegexMatcher.GoogleRE2

[type.matcher.v3.RegexMatcher.GoogleRE2 proto]

Google’s RE2 regex engine. The regex string must adhere to the documented syntax. The engine is designed to complete execution in linear time as well as limit the amount of memory used.

{
  "max_program_size": "{...}"
}
max_program_size

(UInt32Value) This field controls the RE2 “program size” which is a rough estimate of how complex a compiled regex is to evaluate. A regex that has a program size greater than the configured value will fail to compile. In this case, the configured max program size can be increased or the regex can be simplified. If not specified, the default is 100.