Ok, so I wasn't able to find an issue similar to what I've been struggling with, so I apologize if it has been answered or is really easy :-P
So here's my problem: I am importing a file using file_get_contents and want to replace any text that is inside of a double quote unless the double quote is in a single quote itself.
The regex I have now will do the former, but not the latter. The regex I am using is '/"(.+?)"/s', and I am using preg_replace.
Here are 2 examples and what their expected results should be:
##div('$$title or "$$title"');
// current results: '$$title or "$view->title"'
// expected results: '$$title or "$$title"'
##div("$$title or '$$title'");
// current results: "$view->title or '$view->title'"
// expected results: "$view->title or '$view->title'"
If you notice the first example, the single quoted string should be ignored, whereas right now it is not. That's what I need to fix.
Let me know if this makes sense. Thanks!