Whenever you look for a way to search for multiple strings with specific keywords, you can leverage the following code Sample
- (?i) flag for case-insensitive lookup
- \b for looking for full words (similar to ‘has’ string operator vs ‘contains’)
let any_of_the_following = dynamic(['FLORIDA','NEW YORK','GEORGIA']);
let any_of_the_following_regex = strcat(@'(?i)', @'\b(', strcat_array(any_of_the_following, "|"), @')\b');
datatable(tweet:string)
[
'We saw heavy rain in Florida',
'This string does not contain any state.',
'FloridaShould appear separately.',
'NEW YORK is still popular destination among tourists',
]
| where tweet matches regex any_of_the_following_regex
|
Tweet |
|
We saw heavy rain in Florida |
|
NEW YORK is still popular destination among tourists |
“Join the conversation on the Azure Data Explorer community”.
Updated Feb 21, 2019
Version 4.0Tzvia
Microsoft
Joined September 06, 2018
Azure Data Explorer Blog
Follow this blog board to get notified when there's new activity