multiple txt to one new txt
- 
 Hi, @pinuzzu99 and All, Nice ! I even succeded to merge your two kinds of text, by adding a third alternative in the search regex ! 
 So, starting with the input text, below, where the e-mail adresses may be : - 
Preceded with any chars ( asda, 12345 …), followed with, at least, one space char OR beginning the line 
- 
Followed with, at least, one field, determined by a colon separator char 
 bla bla blah bla bla blah bla bla blah asda ladgdfg_jfdggs@yertynno.com.vn:1234556:1654473467:53687091200 bla bla blah bla bla blah jegfa@nkcore.com:jeryr55673:1757810123:53687091200 bla bla blah bla bla blah 12345 ghyfm36@rocgfhmmail.com:mintgg18509:0000000000000:1111111111:55555555555555:777777777777777777:99999999999 bla bla blah bla bla blah bla bla blah asda v7cifgthhy@yasbco.com.tw:512454215:380488:53687091200Use the following regex S/R : - 
SEARCH (?-s)^(?!\h*[\w.\x20]+@).*\R?|^.*?\x20+|.+?:.+?\K:.+
- 
REPLACE Leave EMPTY
- 
Of course, the Regular expressionsearch mode is selected and theWrap aroundoption is ticked
- 
You must use the Replace Allbutton, exclusively ( Not theReplacebutton ! )
 We get the following output text : ladgdfg_jfdggs@yertynno.com.vn:1234556 jegfa@nkcore.com:jeryr55673 ghyfm36@rocgfhmmail.com:mintgg18509 v7cifgthhy@yasbco.com.tw:512454215Notes : This regular expression is composed of 3alternatives :- 
The first part (?-s)^(?!\h*[\w.\x20]+@).*\R?, which have been explained previouly. If deletes any entire line, which does not contain a@char, after a non-null range of words chars and possible dot and/or space chars
- 
The second part ^.*?\x20+which deletes all text between beginning of line and a non-null range of space characters, if that line contains an e-mail address, further on
- 
The third part .+?:.+?\K:.+deletes, after the e-mail adress, from the second:char found till the last standard char of the current scanned line
- 
Note, in this last part, the use of the lazy quantifier +?to identify all standard chars between the first and the second:chars and the\Ksyntax before the second:char, which resets the overall search and just grabs all the remaining chars of current line, from the second:, included
 
 Remark : I strongly advice you to learn the regular expresions world ! Of course, you’ll have to study for 1/2months, but it’s really worth it ;-)). To begin with, consult this FAQ :https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation Best Regards, guy038 
- 
- 
 ohhhhh very great! many thanks for your help! very very thanks. 
 and you’re right when you say you have to study. and usually I do. but in the case of np ++ using little, it did not occur to me to search and learn reg ex expressions. but I will take your suggestion into account.for my question: this is ANOTHER txt, then different. but anyway you code work great, my intent was that! very very many thanks for your help! 
 Regards
- 
 Hi, @pinuzzu99, Ah, OK ! So, if we consider that there were 2separate tasks and starting with your exact input text, below :ladgdfg_jfdggs@yertynno.com.vn:1234556:1654473467:53687091200 jegfa@nkcore.com:jeryr55673:1757810123:53687091200 ghyfm36@rocgfhmmail.com:mintgg18509:11767409268:53687091200 v7cifgthhy@yasbco.com.tw:512454215:380488:53687091200The following regex S/R : - 
SEARCH (?-s)^.+?:.+?\K:.+
- 
REPLACE Leave EMPTY
- 
Click on the Replace Allbutton, exclusively
 should leave you with your expected result : ladgdfg_jfdggs@yertynno.com.vn:1234556 jegfa@nkcore.com:jeryr55673 ghyfm36@rocgfhmmail.com:mintgg18509 v7cifgthhy@yasbco.com.tw:512454215Cheers, guy038 
- 
- 
 thanks you so much, again! cheers 

