Skip to content

Instantly share code, notes, and snippets.

Avatar

Jörn Huxhorn huxi

View GitHub Profile
@166MMX
166MMX / gist:4547129
Last active Dec 11, 2015
Fancy RegEx to match string concatenation for a log message. Something like logger.warn("badaboom " + ex1.message, ex2);
View gist:4547129
\w+?(?:\.(?:trace|debug|info|warn|error)|\[(?:'(?:trace|debug|info|warn|error)'|"(?:trace|debug|info|warn|error)")\])\((?:"(?:[^\\"]|\\\\|\\")*?"|'(?:[^\\']|\\\\|\\')*?'|[^'"\(\)])+\+(?:"(?:[^\\"]|\\\\|\\")*?"|'(?:[^\\']|\\\\|\\')*?'|[^'"\(\)])+\)
You can’t perform that action at this time.