문제

I want to remove text from a log-file with regular expression.

  • everything before: logger=
  • everything after: ):
backup.log (logger=org.brother.powerlab.database.backup): Log database backup
upgrade.log (logger=org.brother.powerlab.database.upgrade): Log database upgrade
clean.log (logger=org.brother.powerlab.database.clean): Log database cleanup
speedtest.log (logger=org.brother.powerlab.database.speedtest): Log database speedtest
statistics.log (logger=org.brother.powerlab.database.statistics): Log database statistics

This can be done with notepad++ with 2 regular expressions.

How to do this with 2 regular expressions? Thanks!

도움이 되었습니까?

해결책

This can be done by single regex find and replace.

  • Find what: .*(logger=.*\):).*

  • Replace with: $1

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top