I would like to find strings in double quotes but only if they used outside of call of specified function foo. For example:
foo("some str1"); // ignore
foo2("another string"); // need this
"simple string"; // need this
foo(L"wide str"); // ignore
#define NAME "name" // need this
int i = foo("must be ignored"); // ignore
I have tried \b(?!foo\()L?"[^"]*"\b from this answer, but it doesn't work correct. Used end double quote on one line as begin on another. Like this "); // ignore<CR> foo2("
If I suppose I should include possessive quantification. To substring not satisfying excluded completely from further search. But don't know how to do it correctly.
It is required to search for files in the Embarcadero RAD Studio XE, but satisfied with any decision in the Perl regexp syntax.
Important: wants to find all occurences of double quoted strings outside of foo function. And not to be distracted by a string inside the foo.
You can try it here: https://regex101.com/r/mG7gP7/1 I match two scenario