I'm creating a search system, and want to support a mix of input terms, for example:
@bob "xxx",'yyy', "freak'd out" 'bob two' "" can I #handle/children #nope @ok(42)
I'd like a regex to grab all the insides of balanced quotes (not tripping over the
To make matters worse, I want to support common search operators that can be prefixed to words or quotes phrases, like so:
+@bob "xxx",'yyy', "freak'd out" -'bob two' "" can I #handle/children -#nope @ok(42)
and in the case of -'bob two' I want to land up with -bob two
.
I also want to ignore the empty ""
.