javascript - store mail id's in to an array using regular expression -
i have html dom string below
<div><p>hello,</p> <p>for following campaign: </p> <div style="margin-left:50px"> <strong>account:</strong> blt+ digital [id: 11641] <br> <strong>advertiser:</strong> own [id: 23512576] <br> <strong>campaign:</strong> greenleaf [id: 43551067]</div> <p></p> <p>...the following creatives have been published qa , ready review:</p> <div style="margin-left:50px"><p> <strong>creative:</strong>own_greenleaf_970x250_ros [id: 43588775] <br> <strong>format/dimensions:</strong> inpage[970x250] <br> <strong>mode: </strong> html5</p></div> <p><strong>publisher:</strong> <a>fanaya@bltomato.com</a></p> <p><strong>cced:</strong> <a>drm-support-us@google.com</a>, <a>fanaya.blt@gmail.com</a> </p> <p>after qa approves creatives, if advertiser association in place, creatives can transferred associated advertiser’s creative library.</p> <p>if you're using doubleclick's qa services, please contact campaign manager coordinate next steps in qa process.</p> <p>custom message:</p><div style="margin-left:50px"><p> </p></div> <p>questions? visit our center @ <a href="http://www.google.com/support/richmedia/" target="_blank">http://www.google.com/support/<wbr>richmedia/</a>.</p> <p>if still have questions after visiting center, or if believe received email in error, please go <a href="https://support.google.com/richmedia/#contact=1" target="_blank">https://support.google.com/<wbr>richmedia/#contact=1</a>.</p> <p>regards,<br> doubleclick studio team</p></div>
i have store mail id's in array this
var mail_ids = [ 'example_id@google.com', 'example_id@gmail.com', 'example_id_another@gmail.com' ];
can 1 me regex doing so.
is looking ?
$(document).text().match(/([a-za-z0-9._-]+@[a-za-z0-9._-]+\.[a-za-z0-9._-]+)/gi)
Comments
Post a Comment