bson | regex functions
This subsection describes regex functions that enable you to perform pattern matching. According to the BSON Specification, regular expressions are two-part values: They have a pattern and options. The functions listed below enable you separate these two parts and extract either of them (the regex-options and regex-pattern functions). You can also create a regex expression based on the pattern and options parameters (to-regex).
Important: The bson functions are compatible only with the Built-In transformation language.
The regex-options function (see screenshot below) extracts the options from a BSON regex value. |
The regex-pattern function (see screenshot below) extracts the pattern from a BSON regex value. |
The to-regex function (see screenshot below) enables you to create a BSON regex value based on the pattern and options parameters. |