TopBots.BlogSpot.Com
C# More: Features Build A Bot Blogs
Code to Extract Email Addresses
TopBots.BlogSpot.Com
This Info Was Quoted From Jay Stilla and Mister Bots Blooger By Google Blogs. TopBots.BlogSpot.Com [Created By iMyriad CEO Jason Jay Stilla Lee" it is a Informative Social Media Marketing Bots News Blog & That List Free Downloads of Automated Bot Software Apps for Facebook, Twitter, Youtube, Google, Instagram & Social Media Websites Written By Jason "Jay Stilla" Lee Online. His Alias Mister Bots Is Software Creation Specialist whom Develops Marketing Bots and Software Scripts that are Given away at no cost weekly. He Also teaches SEO Secrets and Tools For Advertising" Blogger.Com -TopBots Website Blog https://TopBots.Com < Informative Software and internet Technology News Blog.. Web blogging on new 2015 Bots and 2014's Best Software Bots Automated and Scripted Combined. iMyriads.BigCartel.Com < is a Website Created by Jay Stilla
Code to Extract Email Addresses
The Following is a sample code to Extract Email addresses from a given string and store them into an array.I will give the code as Method, so that you can easily import it into your application.This code can be easily used to extract Email Id’s from a web page, just pass the HTML of the web page as the Text2Scrape.
https://TopBots.Com
Script:
This Class uses String arrays to store results
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
- namespace JayStilla.Mrbots
- {
- public class ExtractEmails
- {
- private string s;
- public ExtractEmails(string Text2Scrape)
- {
- this.s = Text2Scrape;
- }
- public string[] Extract_Emails()
- {
- string[] Email_List = new string[0];
- Regex r = new Regex(@"[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}", RegexOptions.IgnoreCase);
- Match m;
- //Searching for the text that matches the above regular expression(which only matches email addresses)
- for (m = r.Match(s); m.Success; m = m.NextMatch())
- {
- //This section here demonstartes Dynamic arrays
- if (m.Value.Length > 0)
- {
- //Resize the array Email_List by incrementing it by 1, to save the next result
- Array.Resize(ref Email_List, Email_List.Length + 1);
- Email_List[Email_List.Length - 1] = m.Value;
- }
- }
- return Email_List;
- }
- }
- }
https://TopBots.Com
Free EPK from TopBots.Blogspot.com
The following code snippet is the same as the above one, the only difference is that this method saves the Extracted Email Id’s to a string list instead of an array, I think the following code is more effective and easy to code
This class uses List to store results, and these list are converted into arrays just before they are returned as arrays
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System. Media;
using System.Threading
- namespace TopBots.Media
- {
- public class ExtractEmailLists
- {
- private string s;
- public ExtractEmailLists(string Text2Scrape)
- {
- this.s = Text2Scrape;
- }
- public string[] Extract_Emails()
- {
- Regex r = new Regex(@"[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}", RegexOptions.IgnoreCase);
- Match m;
- List results = new List();
- for (m = r.Match(s); m.Success; m = m.NextMatch())
- {
- if (!(results.Contains(m.Value)))
- results.Add(m.Value);
- }
- return results.ToArray();
- }
- }
- }
https://TopBots.Com
UBot Studio
Announcing UBot Studio – The First And Best Simple-To-Use, No-Programming-Necessary Bot Maker!
UBot is the internet marketer’s Swiss army knife. While other software attacks SEO, keyword research, and indexing with a chainsaw, UBot grows your business your way using marketing automation that YOU control. With an intuitive drag-and-drop interface and intelligent commands, it simplifies complicated and time-consuming tasks like account creation, article spinning, posting and messaging, on any websites you choose. Just watch a few of the tutorials and you can see how simple it is to stand out from the crowd with your own customized bots.
Other Non Bot Options:https://TopBots.Com