phpstorm - Regex to find strings not encapsulated with __("") -
i trying find instance of string in our code needs sent __() function.
i have following regex:
(\[|__\()[\'\"][\w\s\\\:]+[\'\"] that matches:
['valid string' ["valid::str::ing" __('valid\string' __(" v l d s t r n g " but not:
'hel\lo there ' "he::he" i need reverse match. have tried various methods negate ([|__() section have not had success.
how can write the expression match strings not preceded [ or __(?
thank you.
you might able use negative lookbehind. please see:
Comments
Post a Comment