Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find multiple words on the same line in Notepad++

Tags:

I have a 4MB log file from the Windows XP firewall which I'm trying to find lines that have both DROP and an IP and a port number. My regex-fu is weak and I'm assuming this is the reason I'm struggling.

The words "DROP", "10.1.1.1" (for example) and "8801" need to be found on the same line and may be spread across the line and separated by one or more other words.

Any help (or suggestions of another method to do this) are much appreciated.

like image 714
Mike Avatar asked Mar 14 '10 20:03

Mike


People also ask

How do I use the Find tool in notepad?

Find tab: Gives access to searching and counting. It can be invoked directly with Search > Find or the keyboard shortcut Ctrl+F . Replace tab: Similar to Find tab, but allows you to replace the matched text after it's found. It can be invoked directly with Search > Replace or the keyboard shortcut Ctrl+H .


1 Answers

The easiest solution should be:

DROP.*10.1.1.1.*8801
like image 80
netsec Avatar answered Sep 28 '22 18:09

netsec