0

I have a text in such form :

1.2.3.4.5.6
a.b.c.d.e.f
1.a.2.b.3.c
1.2.3.4.5.6
a.b.c.d.e.f

the other text is :

1.2.3.4.5.6
a.b.c.d.e.f
1.a.2.b.3.c
1.2.3.4.5.6
a.b.c.d.e.f
b.c.n.g.k.i

i want to use notepad ++ where i will be able to remove all match lines and keep only lines i need so the text will look like this

b.c.n.g.k.i

where b.c.n.g.k.i is the new line that i need and the other lines i need to delete.

can someone help?

Toto
  • 89,455
  • 62
  • 89
  • 125
ib ib
  • 1

1 Answers1

0

Please take a look to this: Regular expression to match a line that doesn't contain a word?

In this case you can search with Regular Expression and select ". matches newline" and the replacement string should be empty to delete all the lines you don't want.

In this case this regex will do the job.

^((?!b\.c\.n\.g\.k\.i).)*$.?
Community
  • 1
  • 1
Oscar Hermosilla
  • 480
  • 5
  • 21
  • sir, if a text is too long for doing search and replace how can i know b\.c\.n\.g\.k\.i is new line? i need to compare these 2 texts using notepad++ and i get the different lines stand alone. thx. for your record these texts are not in order so i can use the plug in compare at notpad++. any suggestions – ib ib Sep 03 '14 at 05:27
  • Excuse me for my answer but I didn't really understand in the first place what you needed. What you are trying to do I normally do it with the tool Beyond Compare which is very powerful but it is not free. Notepad++ has also a Compare plugin and it works to compare two files but I don't know how to only take the different lines. There is also other free compare tools like WinMerge or other that you can try – Oscar Hermosilla Sep 03 '14 at 09:14
  • thx bro, but i need a tool than we can use it for find and replace many lines at once. for example my text 1 i want to paste it all in find filed and i leave the replace filed empty so the result i get is only the new different line which is b.c.n.g.k.i – ib ib Sep 06 '14 at 08:58