REGEXES = [(re.compile(r'cat'), 'cat2'),
(re.compile(r'(if)(.*)(\r?\n)(\s*)(logger.info)(.*)'), '\1\2')]
for search, replace in REGEXES:
line = search.sub(replace, line)
Why is it not working on...
if( List != null ) {
logger.info( "List is not null" );
fieldSetContainerList.clear();
}
Works fine with Notepad++ regex search replace. Usage: Want to remove logger.info statements below all if statements.
r'\1\2')]instead of'\1\2')]