https://github.com/osquery/osquery logo
#fleet
Title
t

Tor Houghton

02/17/2023, 8:46 PM
hello; is there a way of doing regular expression matching when doing a query? (LIKE "%foo%" matching is too greedy for me 🙂)
k

Kathy Satterlee

02/17/2023, 9:24 PM
Hi @Tor Houghton! osquery supports regex_match, the syntax for that would be something like this:
Copy code
SELECT * from <table> WHERE regex_match(<column>, <expression>, 0) IS NOT null;
t

Tor Houghton

02/17/2023, 9:27 PM
Ah! Thank you, I'll give this a go!