I have two regex strings:
[^'"0-9+\-%*\/<>\!=&|](['"])(?:\\\1|.)*?\1
The first one finds anything but the listed characters. The second one finds anything between quotes, including the quotes.
I want to merge these so that I find anything that matches these characters or group of characters between quotes, excludes the matches it found, and returns everything else. For example in the following phrases, I want it to return only the bolded characters.
Hello world "This is a test"
"Another test" 5 x 4
'And this has an escaped quote don\'t in it ' Blue Boy
"This has a single quote ' but doesn't end the quote as it started with double quotes"
hello
28 + 2 / 10 * 3 abc
" Lorem ipsum dolor\" sit 'amet' "
Is this possible? Any help would be appreciated.