OMS query language doesnt have a caseinsensitive search option, however i see that it does support REGEX

835 Views Asked by At

OMS query language doesnt have a case insensitive search option, however i see that it does support REGEX. Regex has a parameter /i to allow case insensitive searches. However I am unable to figure out how to use the regex in oms with /i

Does OMS logsearch support /i option at all? can someone give an example of usage or any other way of achieving a case insensitive search in OMS log search.

2

There are 2 best solutions below

4
On

Here you go:

@   Any string of characters.   Computer=RegEx("[email protected]")  srv01.contoso.com srv02.contoso.com
.   Any single character.       Computer=RegEx("srv...contoso.com") srv01.contoso.com srv02.contoso.com

https://learn.microsoft.com/en-us/azure/log-analytics/log-analytics-log-searches-regex

0
On

You can turn on case sensitivity using the regex mode modifier (?i)

for example:

where string matches regex ("(?i)query")