I am trying to use the following query fragment to allow for variable regex filter inputs.
| where isempty("[[HttpStatusCode]]") or tostring(httpStatus_d) matches regex "[[HttpStatusCode]]"
The query is being executed in Azure Log Analytics from within Grafana. I have variables on the Grafana dashboard that allow the user to input a regex expression that feeds into the query. When the filter is empty, I expect no filtering to be applied. I was thinking the Kusto queries may support short-circuiting and when isempty(..) evaluated as true, then the remainder of the expression would be ignored and the matches regex portion would not execute nor throw an error.
The error message I get when the string is empty is "Relop semantic error: 'matches regex' has the following semantic error: SEM0031: matches regex: argument 2 must be a constant non empty string value."