How to delete multiple words/part of lines in log
-
Hi!
Lots of time I’m editing huge log files, for ex. today I’m editing ~ 600 lines. How can I use regex to delete specific stuff to save time? To be precise:
access-list xxx extended permit udp host 10.10.10.10 20.20.20.20 255.255.255.0 eq snmptrap (hitcnt=0) 0xc1bfb91f
access-list xxx extended permit udp host 10.10.10.10 20.20.20.20 255.255.255.0 eq snmptrap (hitcnt=500) 0xc1bfb91fSo afterwards it’s just:
access-list xxx extended permit udp host 10.10.10.10 20.20.20.20 255.255.255.0 eq snmptrap
access-list xxx extended permit udp host 10.10.10.10 20.20.20.20 255.255.255.0 eq snmptrapSo basically, I just need to delete any stuff after (
Tnx
-
You can try
CTRL+F
Then click on Change and search for: (.*It search for text that contains ( and all after the ( will removed
-
-
Done it!
It’s going with: \ (.*Thanks! :)