grafana/loki

Case-insensitive flag line filter regex only matching uppercase

Closed this issue · 1 comments

Describe the bug
Using the case-insensitive flag (?i)in a label regex filter =~ causes the query to only match uppercase values, rather than any case.

To Reproduce
Steps to reproduce the behavior:

  1. Using the LogQL Analyzer demonstrates this issue - only one of the sample log entries (the second one, level=INFO) is matched by this query
  2. Sample data:
level=info
level=INFO
level=InFo
  1. Test query: {job="analyze"} | logfmt | level =~ "(?i)info"

Expected behavior
Every row in the sample data should have been matched. Using the case-insensitive flag on stream selectors does not appear to have the same outcome.

Additional information
Potentially related to #7837?

Thank you!