I am using a cool widget to import email addresses out of gmail/homail/yahoo etc. The widget is still beta and I guess thats why it does not allow a lot of configuration. It actually just fills a textarea with the following data:
"Name one" <[email protected]>, "Name Two" <[email protected]>, "And so on" <[email protected]>
So I wondered if someone could help me write a regex or something like that to get all values out ofa string into an array. The desired format would be:
[{name: 'Name one', email: 'foo@domain'},{name: 'Name Two', email: 'foo@domain'},{name: 'And so on', email: '[email protected]'}]
I am a total regex noob and I have no clue on how to do that in javascript. Thanks for your help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…