InfluxQL supports using regular expressions when specifying:
- field keys and tag keys in the
- measurements in the
- tag values and string field values in the
- tag keys in the
Regular expressions in InfluxQL only support string comparisons and can only evaluate fields with string values.
Note: Regular expression comparisons are more computationally intensive than exact string comparisons. Queries with regular expressions are not as performant as those without.
SELECT /<regular_expression_field_key>/ FROM /<regular_expression_measurement>/ WHERE [<tag_key> <operator> /<regular_expression_tag_value>/ | <field_key> <operator> /<regular_expression_field_value>/] GROUP BY /<regular_expression_tag_key>/
Regular expressions are surrounded by
/ characters and use
Golang’s regular expression syntax.
=~: matches against
!~: doesn’t match against
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.