Thanks Sergey! What does the loRegExp.Global = .T. setting do?
>Hi Jos,
>
>The best way is using regular expressions
>
>lcText = "somebody@something.com abc@sajkfhe.com"
>loRegExp = CreateObject("VBScript.RegExp")
>loRegExp.Global = .T.
>loRegExp.Pattern = '([a-zA-Z\d][-._\w]*@\w[-._\w]*\w\.\w{2,4})'
>loEmAddrList = loRegExp.Execute(lcText)
>
>FOR EACH loAddr IN loEmAddrList
> ? loAddr.Value
>ENDFOR
>>
>>I am looking for the fastest way to find an email address within a block of text of variable length and unknown layout. Any suggestions for quickest/easiest solution? I know I can use AT() to look for an "@" char but is there any clever trick to getting the address quickly?
>>
>>Thanks,
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.