You're asking for a whole regex, not for help with a part of a regex.
Think of it like this - you want us to help you construct the entirety of a regex that is capable of validating that someone enters "and", "or" and "not" in a specific form, complete with grouping and higher level ordering (the parentheses have value here).
You don't have any previous regex that you could submit to us that accomplishes some part of this that you're stuck with.
That sounds to me like a day or two of actual work, with Google, desk-to-head therapy sessions, and copious amounts of testing stress with those annoying edge cases of looking for "and" and not "not" or "or".
You're asking too much of us here. We can't build whole regexes for you. We could probably help you build a regex, but you'd need to provide something for us to work off of.