Code
/(("[^"]*")|(\/*.*?\*\/)|(\/\/.*)|(?<result>Whatyousearchfor))/gm
if the element 'result' is found, you found what you needed.
Keep in mind this does work with //'s and with /* */'s, and with double and single qoutes...
Depending on the engine, this might not work with multi line /* comment blocks.
Oh, i guess this is a bit redundant to say so, but "whatyousearchfor" can be a regex ofc
But srsly dude, get a parser.