I've recently seen this stackoverflow question that excludes all catch statements with a specific word.
Regex find catch blocks without log
catch\s*\(\s*\w*\s+\w*\s*\)\s*\{(?:[^}](?!\blog\b))*\}
How would you do the opposite?
I've tried switching the negative lookaround part to a positive lookaround, but all that does is grab empty exceptions.
catch\s*\(\s*\w*\s+\w*\s*\)\s*\{(?:[^}](?=\blog\b))*\}
example:
catch (Exception e)
{
log.debug("word");
//stuff
}
I want to find all instances of "log.debug"