Regex to match C++ style preprocessor macro defines

This took a few days of trying…

/^[ \t]*#define[ \t]+(\S+)[ \t]*((?:.*\\\r?\n)*.*)/gm

Categories:

Updated:

Comments