Hello,
I'm experimenting with the new scripts experience and I'm trying(for now with no luck)
to filter out some incorrectly typed negative keywords from our campaigns.
I'm searching for negative keywords that have ONLY an opening or closing square bracket(but not both at the same time) or just 1 quote.
for example:
"tets 1 - I need this
"test 2" - skip this one
[test 3 - need this as well
[test 4] - regex should skip this one
I'm thinking of something like:
var negativeKeywordSelector = campaign.negativeKeywords().withCondition("campaign_criterion.keyword.text REGEXP_MATCH '\[.*|.*\]'").get();
but I have some troubles with escaping the special characters ],[ and ".
Even If I try with \\ in front of the special characters, the selector still doesn't work properly.
I came across this conversation, but it didn't work in my situation
https://groups.google.com/g/adwords-scripts/c/n96t2N3G-PY/m/efYDoYG2AQAJAny help would be much appreciated. Thank you!