I am completely hopeless with regular expressions...
I have a Velocimacro named #addButton, and I have a JS function named addButton(). Now
/([^#]|^)addButton/
It will match every string where "addButton" is not preceded by "#" or the beginning of the string.
I don't know what Velocimacro is (judging from the other answer I guess "addButton" will appear on its own line?), but the sure-fire way of finding the word "addButton" that is not preceeded by # is the following:
/(?<!#)\baddButton\b/
It will:
(?<!#) (?)
# (hash mark)\b (?)
addButton (?)
\b (?)
A difference with this regular expression and the other is that this one will not consume the character before "addButton".
A good resource for learning about regular expressions is regular-expressions.info. Click the (?) link in the list above for a link to the relevant page for that part of the regex.