vba - Regex to insert new line character after semicolon and remove names before email -


i have list of emails on 1 line clean up. in following format:

jones, peter <jones.h7@petstore.com>; bradley, charles <bradley19@petstore.com>; frank, hilda <frank.hl@petstore.com>; 

and desired result follows:

jones.h7@petstore.com; bradley19@petstore.com;  frank.hl@petstore.com; 

so names , angle brackets around email removed.

i regex solution. have tried replacing ;\s \r\n did not tthe expected result. new regex i'm stuck.

instead of replacing <...>-ed emails, can match mails 1 of following regular expressions (if insist on regex solution):

<([^@<>]+@[^@<>]+)>; 

the email addresses in captured group 1. see demo

if need string replacing not need, may still use

<([^@<>]+@[^@<>]+)>(;)|[^<>]+|<|> 

with $1$2 replacement string. see demo


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -