Matches Regex
Overview
The Sifflet Matches Regex monitor template is a field-level format validation monitor. It accepts string fields and fails if the monitored field contains data that does not match the provided regular expression (regex).
As Code
Monitor Kind: FieldFormat
All the format monitors are grouped under the FieldFormat monitor kind.
format.kind: Regex
Set the format kind to Regex to use the regex mode of the FieldFormat as-code monitor.
regex:
Provide the regex pattern to match in the regex parameter.
field: The field that the monitor checks the format of.
parameters:
kind: FieldFormat
field: PHONE_NUMBER
format:
kind: Regex
regex: "\\b(\\(\\d{3}\\)\\s?|\\d{3}[-\\.\\s]?)\\d{3}[-\\.\\s]?\\d{4}\\b"Filtering and Grouping
Field format monitors allow filtering and grouping parameters.
parameters:
kind: FieldFormat
field: PHONE_NUMBER
format:
kind: Regex
regex: "\\b(\\(\\d{3}\\)\\s?|\\d{3}[-\\.\\s]?)\\d{3}[-\\.\\s]?\\d{4}\\b"
whereStatement: NOT invalid
groupBy:
field: REGIONTime Window (Beta)
Beta
Field format monitors allow time window parameters.
Threshold Settings (Beta)
Beta
Field format monitors allow threshold configuration.
Updated 5 days ago
Did this page help you?

