I am trying to find the right way to get this regex:
\b([A-Za-z]|_)+\b
To not match whole words between quotes (' AND "), so:
example_ _where // matches: example_, _where
this would "not be matched" // matches: this and would
while this would // matches: while this would
while 'this' would // matches: while and would
Additionally I am trying to find out how to include words containing numbers, but NOT only numbers, so again:
this is number 0 // matches: this, is and number
numb3r f1ve // matches: numb3r and f1ve
example_ _where // matches: example_ and _where
this would "not be 9 matched" // matches: this and would
while 'this' would // matches: while and would
The goal is to try and match only words that would be valid variable names in most common programming languages, without matching anything in a string.