Jump to content

Recommended Posts

Posted

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]

Posted

#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 to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Posted

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]

Posted

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]

Guest
This topic is now closed to further replies.
×
×
  • Create New...