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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -