influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
769 stars 153 forks source link

regexp support look-around, including look-ahead and look-behind #5096

Closed ZeroSean closed 1 year ago

ZeroSean commented 2 years ago

Proposal: use string regexp to filter metrics record, for example: from(bucket: "tsdb_mysql") |> range(start: 2022-08-10T06:50:00Z, stop: 2022-08-10T07:15:00Z) |> filter(fn: (r) => (r._measurement == "mysql_global_status_queries" and r._field == "value") and r.hostname !~ /mgb-test(?!da01-dba|dp01-dba).*/)

Current behavior: occured errror: compilation failed: error @12:117-12:266: regex parse error: mgb-test(?!da01-dba|dp01-dba).* error: look-around, including look-ahead and look-behind, is not supported

Desired behavior: flux string regexp support look-around, including look-ahead and look-behind.

github-actions[bot] commented 1 year ago

This issue has had no recent activity and will be closed soon.