I want to test if a method appears in a header file. These are the three cases I have:
void aMethod(params ...)
//void aMethod(params
// void aMethod(params
^ can have any number of spaces here
Here's what I have so far:
re.search("(?<!\/\/)\s*void aMethod",buffer)
Buf this will only match the first case, and the second. How could I tweak it to have it match the third too?
EDIT:sorry, but I didn't express myself correctly. I only want to match if not within a comment. So sorry.