Try using [[] (match any of the following characters: [): https://play.golang.org/p/ynvSW3lIHDY
/MR On Thu, Apr 22, 2021 at 3:02 AM Patrick Mackey < [email protected]> wrote: > Hi, all. > > I'm trying to match the left bracket character '[' with a regex and seem > to be hitting some issues. I've tried with the octal sequence \133 and the > hex sequence \x5B but both return either false positive matches or the > following error: > > Error executing query: invalid parameter "query": 1:19: parse error: error > parsing regexp: missing closing ]: `[.*)$` > > I'm running 2.26.0 from Docker. > > My query is variations of: > ifOperStatus{ifAlias=~"\133.*"} > > Matching the right bracket ']' with \135 and \x5D works fine. > > Any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/083e9924-483c-4506-aba6-f35be725798an%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/083e9924-483c-4506-aba6-f35be725798an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_ganJQjaJjP%3DHUOLFC7j3PoCFXaVoi_rBwVOM6v8q1ZWdw%40mail.gmail.com.

