You are here

Notepad ++ Portable deleting every second line

5 posts / 0 new
Last post
Donnie
Offline
Last seen: 15 years 6 months ago
Joined: 2008-08-24 04:12
Notepad ++ Portable deleting every second line

I know this is not the notepad++ forum. Maybe this is not right place to ask that, but I simply do.

I have a file that is built up like this:

000.0.0.0 tet.de
000.0.0.0 site.net
000.0.0.0 123.com
000.0.0.0 name.com
000.0.0.0 .name.com
000.0.0.0 abc.com
000.0.0.0 .abc.com

As you see the number is always the same. Now I want to remove the line that contains a "." at the beginning of the text. It's every second line. I mark the lines from the beginning of the first "." appearance to the last, but what have I to do then?

I want to keep abc.com but not .abc.com. I tried it manually, but it's a long list.

Any suggestion how to do that in one step? (Or two) I know that this is something special.

Thanks anyway.

cbj0129
Offline
Last seen: 3 years 9 months ago
Joined: 2006-04-03 21:59
Regular expressions

Its done with regular expressions
http://notepad-plus.sourceforge.net/uk/regExpList.php

Clair

Donnie
Offline
Last seen: 15 years 6 months ago
Joined: 2008-08-24 04:12
I'll try

I'll try it. If I don't succeed I do it manually. It doesn't matter if I try to find the right expression setting and waste several hours or do it manually what takes some hours, too.

Thank you.

Donnie
Offline
Last seen: 15 years 6 months ago
Joined: 2008-08-24 04:12
Thanks again. I tried, but I

Thanks again. I tried, but I failed. Not that Notepad++ can't do what I want... I'm just to stupid to make Notepad++ do what I want.

ZorakThemantis
Offline
Last seen: 16 years 5 days ago
Joined: 2008-11-21 06:59
Notepad ++ Portable deleting every second line

Using Replace (ctrl-h)
Find what:^.*0 \..*$
Replace with:(leave empty)
Search mode: Check the regular expression radio button

That should do it (~3 months later). Smile

Log in or register to post comments