regex match character between quotes code example
Example 1: regex to match string not in between quotes
((?!\'[\w\s]*[\\']*[\w\s]*)foe(?![\w\s]*[\\']*[\w\s]*\'))
Example 2: regular expression match text between quotes
(["'])(?:(?=(\\?))\2.)*?\1