Z
Z
ZeroMan2021-01-20 14:15:07
Notepad++
ZeroMan, 2021-01-20 14:15:07

Remove all unnecessary except ip-v4?

How to remove everything unnecessary from a file of this type:

Nmap scan report for 192.168.0.21
Host is up (0.18s latency).
Not shown: 1 filtered port
Some closed ports may be reported as filtered due to --defeat-rst-ratelimit
PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for 192.168.0.29
Host is up (0.029s latency).
Not shown: 1 filtered port
Some closed ports may be reported as filtered due to --defeat-rst-ratelimit
PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for 192.168.0.25
Host is up (0.15s latency).
Not shown: 1 filtered port
Some closed ports may be reported as filtered due to --defeat-rst-ratelimit
PORT   STATE SERVICE
22/tcp open  ssh


So that the result is:
192.168.0.21
192.168.0.29
192.168.0.25

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-01-20
@ZeroMan0

Find: (?s).*?(\z|\d+\.\d+\.\d+\.\d+)
Replace: $1\n
https://regex101.com/r/f4tDrt/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question