Hi all,
I am new to the Regex world
I need a regex to match the words "AND/OR/NOT/NEAR/SAME" that is not with in the qoutes
For Example
"Printer AND Scanner" OR computer
should match only the word OR and not the "AND" with in quotes
Thanks
You could try something like:
Source Text:"Printer AND Scanner" OR NOT computer
Raw Match Pattern: "[^"]*"|(?:(?:AND|OR|NOT|NEAR|SAME) *)+ $matches Array: ( [0] => Array ( [0] => AND [1] => "Printer AND Scanner" [2] => OR NOT ) )