I'm trying to write a query that looks for strings that contain square brackets []. When I use [ and ] in the query swql interprets them like regex does. Here are some examples of what I'm trying to match:
| port-channel2003 · servername.blah.com |
| port-channel2020 · [V] servername1.blah.com |
| port-channel2004 · servername2.blah.com |
| port-channel2009 · [N] servername3, prod, port-channel 2 |
I only want to match the last one and I'm trying to use a query like this:
...
WHERE aa.AlertObjects.EntityCaption like '%port-channel%[%N%]%'
SWQL is returning all of them because they all have the letter N in them after the 'port-channel' part. I want to literally search for the characters [ and ].
I have tried escaping the [ and ] with / , // , \ , \\ , ` , ' , " to no avail. I also tried using ESCAPE '/' like in SQL but had no luck.
Any help is greatly appreciated
Michael