Regex in query bar - get results for strings that don't start with '/'

I'm trying to filter out all products that start with a forward slash. Is there a way to do this with the query bar?

My field: i.Product Code/UPC.keyword

I've been trying: "i.Product Code/UPC.keyword"=/(?!/)*/ but that doesn't seem to filter anything out.

Also, I'm a little confused as to when I should use an = or a : in my query bar formula ... the : always seems to give me an error. Is it because I have spaces in my field name?

/ is a special character in regex so it may need to be escaped. Use \ to escape characters.

Here is a link to the query syntax documenation. That should clear up when to use : versus =.

Thanks, Nathan, that does clear things up a little.

Still, I'm not getting anything with this regex to find values that do not start with the number 7

i.Product\ Code/UPC.keyword:/^(?!7).+/

Anything I might be missing with this syntax?


Try fine tuning your regex outside of Kibana/Elastic since those can be complicated enough to debug. I like to use when building regexes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.