array matches(value, regex)
Returns the result of matching a value against a regular expression.
An array value will return the result of the first matching element, a dictionary value will return the result of the first matching key, otherwise the value itself is matched.
Flags embedded as a prefix in regex:
Flag | Description |
---|---|
(?d) | Unix lines mode |
(?i) | Case-insensitive matching (US-ASCII only) |
(?iu) | Case-insensitive matching (Unicode, preferred) |
(?m) | Multiline mode |
(?s) | Dotall mode |
(?u) | Unicode-aware case folding |
(?x) | Ignore whitespace and comments in pattern |
null
if there were no match.