I have a query in which I want to wrap every word in double quotes by ignoring certain attributes, but I also want to ignore the words which are already in double quotes.
I am ignoring has, from, to, sample etc but not able to ignore words in double quotes.
Could anyone please nudge me in the right direction ?
Current regex -
\b(?!\bOR\b)\b(?!\bAND\b)\b(?!\bfrom:\b)\b(?!\bto:\b)\b(?!\bhas:\b)\b(?!\bsample\b)\w+\b
Query -
(@harrys OR from:harrys OR to:harrys OR ("harry's" OR harrys) AND (razor OR razors OR shave OR shaving OR shaved OR shaver OR subscription OR razorhead OR razorheads OR buy OR bought OR buying OR boxers OR cover) AND (has:geo OR has:profile_geo) -styles -prince -markle -meghanmarkle)