Prakhar Posted January 24, 2010 Posted January 24, 2010 Hi everyone , i want an algorithm which can fetch email addresses from normal text file. Eg. A@an.com from text file t.txt which contains - hi brother A@an.com is my email address is THANKS IN ADVANCE [size="5"]"No Pain, No Gain"[/size]
funkey Posted January 24, 2010 Posted January 24, 2010 #Include <Array.au3> $text = 'hi brother [email="A@an.com"]A@an.com[/email] is my email address' $Pattern = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}" $a = StringRegExp($text, $pattern, 3) _ArrayDisplay($a) Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
Prakhar Posted January 25, 2010 Author Posted January 25, 2010 Sorry, it didn't worked ,but thanks. I want to fetch all the addresses in the file attached, the file will contain some texts (Like an example of iTunes I've shown in file), the text will not be static it will change now and then.The algorithm should find email address by following expressions :-@ @@(@)<@>.@..at.(at)_at_@at@\'at\'\"at\"(atsign)(at_sign) (at-sign)(at sign) [size="5"]"No Pain, No Gain"[/size]
BrettF Posted January 25, 2010 Posted January 25, 2010 Could you give us a sample of the file please? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Prakhar Posted January 26, 2010 Author Posted January 26, 2010 Sample of file- Kindltientlinkinemd.gjg.jmdmjtag.mgjmdgmtkgjt.jgkgjgjagjgjhjgjt Mike -mike@gmail.co.in Tom :Tommy<atsign>domain.com WeaponX| W.X(@)gmail.com Gates\gates.at.home.com Tommy # tom.cool'at'hotmail jg.wmgj.jagmp.ja.mwgtpgmgjt gmpw.jmwjm.jt.gmtmtdmjgmjtjtmt g.jtpg.mtjmtjgmdj.tgdmjtgmgt.mdjtg [size="5"]"No Pain, No Gain"[/size]
PsaltyDS Posted January 26, 2010 Posted January 26, 2010 WeaponX| W.X(@)gmail.comPeople obfuscate their email addresses like that for a reason... and where exactly did the file come from? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Valik Posted January 26, 2010 Posted January 26, 2010 We will not help you in your endeavor. Thread locked, do not ask again.
Recommended Posts