henkit 0 Posted August 3, 2013 Report Share Posted August 3, 2013 how can i scrape all emails from a page wit regex ? Thanks Quote Link to post Share on other sites
UBotDev 276 Posted August 3, 2013 Report Share Posted August 3, 2013 I think the easiest way is to scrape the HTML of the whole page, and then use REGEX to extract emails. Here is an example: set(#HTML, $scrape attribute(<tagname="html">, "outerhtml"), "Global") clear list(%EMAILS) add list to list(%EMAILS, $find regular expression(#HTML, "[a-z0-9!#$%&\'*+/=?^_`\{|\}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`\{|\}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[A-Z]\{2\}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\\b"), "Delete", "Global") Quote Link to post Share on other sites
peleus 2 Posted August 4, 2013 Report Share Posted August 4, 2013 Makes sense. Rather than going to the trouble of scraping it selectively. I'll give this a try and thanks for the suggestion. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.