I am trying to add log4j to legacy software using eclipse search / replace.
The idea is to find all the class declarations and replace them with the declaration itself plus the registrar definition in the next line.
Search
".*class ([A-Z][a-z]+).*\{"
replace:
"final static Logger log = Logger.getLogger($1.class);"
How can I add a matched pattern (class definition) to the replacement string?
source
share