How can I delete before and after EMAIL in notepad++?

0

I have this:

:814, 'pera', 'name1@gmail.com', '2ed', '', 'da', 0.00, '195..110.18'),

>815, 'danka', 'name2@gmail.com', 'd3d6', '0655566', 'da', 0.00, '212..65.82'),

*816, 'ana', 'name3@gmail.com', 'b6e1', '06rt45t02', 'da', 0.00, '178..83.40'),

/817, 'biljana', 'name4@gmail.com', '53c9', '', 'da', 0.00, '95.180.6.'),

,818, 'Vladimir', 'nemae5@gmail.com', '02', '', 'da', 0.00, '178..29.221'),

I Need this:

name1@gmail.com

name2@gmail.com

name3@gmail.com

name4@gmail.com

name5@gmail.com

I need a string for notepad++ to replace everything before and after an email address

Note: Everything after and before an email is different. Not one line of code is the same. Some have just numbers (no , and no '), some both, some have just after email text, some are the same as the row before

Autentiknet

Posted 2014-08-12T13:33:02.683

Reputation: 1

1What have you tried? Super User is not a script writing service. We will be more than happy to help, if you show some research effort. As it stands, this question will be likely closed. – Cfinley – 2014-08-12T13:55:57.210

1The output looks like a simple CSV format to me. Have you tried importing it into a spreadsheet program like Excel? Once you do that, column C should be just the e-mail addresses - except perhaps for the case of "Vladimir". Stuff like that (an extra comma outside of quotation marks) will throw it off for sure. – Iszi – 2014-08-12T14:24:46.103

Answers

0

Use regex replace

search:

^.*'(.*@.*\.\w{1,6})',.*$

Or

^.*\W(\w*@\w*.\w*)\W.*$

Replace:

$1

Feel free to enhance the regex if you want, I know it's not perfect

Edit: another regex to try

max890

Posted 2014-08-12T13:33:02.683

Reputation: 251