1 like 0 dislike
14 views
How to get or extract the IP addresses from the huge logs using notepad++
in Education & Reference by (1.4k points) | 14 views

1 Answer

0 like 0 dislike
Best answer
Ctrl+H
Find what: ^.+?((?:\d+\.){3}\d+).+$
Replace with: $1
check Wrap around
check Regular expression
DO NOT CHECK . matches newline
Replace all

Explanation:

^           : beginning of line
.+?         : 1 or more any character but newline
(           : start group 1
  (?:       : start non capture group
    \d+     : 1 or more digit
    \.      : a dot
  ){3}      : end group, must appear 3 times
  \d+       : 1 or more digit
)           : end group 1
.+          : 1 or more any character but newline
$           : end of line

Replacement:

$1          : content of group 1 (ie. the IP)
by (2.9k points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Dec 17, 2018 in Education & Reference by Neha (720 points) | 57 views
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
1 like 0 dislike
2 answers

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,227 questions
1,373 answers
559 comments
2,099 users