SQL regular expression functions
Limited availability
InfluxDB Clustered is currently only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.
The InfluxDB SQL implementation uses the POSIX regular expression syntax and supports the following regular expression functions:
regexp_match
Returns a list of regular expression matches in a string.
regexp_match(str, regexp, flags)
Arguments
- str: String expression to operate on. Can be a constant, column, or function, and any combination of string operators.
- regexp: Regular expression to match against. Can be a constant, column, or function.
- flags: Regular expression flags that control the behavior of the
regular expression. The following flags are supported.
- i: (insensitive) Ignore case when matching.
regexp_replace
Replaces substrings in a string that match a regular expression.
regexp_replace(str, regexp, replacement, flags)
Arguments
- str: String expression to operate on. Can be a constant, column, or function, and any combination of string operators.
- regexp: Regular expression to match against. Can be a constant, column, or function.
- replacement: Replacement string expression. Can be a constant, column, or function, and any combination of string operators.
- flags: Regular expression flags that control the behavior of the
regular expression. The following flags are supported.
- g: (global) Search globally and don’t return after the first match.
- i: (insensitive) Ignore case when matching.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.