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:

http://www.regular-expressions.info/lookaround.html


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -