Thanks very much. Your solution is working perfectly.
>WSH is included starting with Win2k but it may be disabled by over-cautious sysadmins.
>
>>Thanks. On which platforms could I assume CreateObject("VBScript.RegExp") to be available?
>>
>>
>>
>>>It tells the parser to return all matches, not the first one only.
>>>
>>>If WSH is not an option, you can use Craig's FLL from
http://www.sweetpotatosoftware.com/SPSBlog/2006/01/14/RegularExpressionsForVisualFoxProPart3.aspx>>>
>>>lcText = "somebody@something.com abc@sajkfhe.com"
>>>
>>>SET LIBRARY TO regexp.fll
>>>lcPattern = '([a-zA-Z\d][-._\w]*@\w[-._\w]*\w\.\w{2,4})'
>>>DIMENSION laEmAddrList[1]
>>>
>>>lnMatches = regexp(lcText, lcPattern, 2, "laEmAddrList")
>>>
>>>FOR i=1 TO lnMatches
>>> ? laEmAddrList[i]
>>>ENDFOR
>>>
>>>
>>>>Thanks Sergey! What does the loRegExp.Global = .T. setting do?
>>>>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.