I asked this question earlier but I didn't express myself correctly. If I have these three cases:
void aMethod(params ...)
//void aMethod(params
// void aMethod(params
^ can have any number of spaces here
How could I tweak my regex to match only if the string is not found in a comment? This is my regex:
re.search("(?<!\/\/)\s*void aMethod",buffer)
Would this catch everything:
(?<!\/\/)(?<!\s)+void onMouseReleased