I'm writing a function list parser for Notepad++ to add support for Nasal.
I'm using the following regular expression:
^[\t ]*(var[\n\s]+)?([_A-Za-z]?[\w_]*)[\n\s]*=[\n\s]*func[\n\s]*(\([^\)\(]*\))?: Debuggex Demo
... to match these 2 types of valid declarations:
foo = func...var foo = func...
To further extract the function name foo from the matches of this regex, the best I could come up with was:
(var[\n\s]+)?([_A-Za-z]?[\w_]*): Debuggex Demo
Using this matches "foo" or "var foo", as the case may be. What is a regex that can ignore the presence of the substring var[\n\s]+], so it only extracts "foo" for the function list?
Thanks a lot.