>i have the following string:
>
>Peter Cortiel 860-555-11234 or
>Jack Kennedy (860) 555-1234
>
>and need to extract the phone#
>
>this should work but does not:
>
>lparameters tcText
>tcPassword = Alltrim(tcText)
>
>Local oRE
>oRE = CreateObject("VBScript.RegExp")
>oRE.Pattern = "^\+?\(?\d+\)?(\s|\-|\.)?\d{1,3}(\s|\-|\.)?\d{4}$"
>oResults = oRE.execute(tcText)
>For Each oResult in oResults
> WAIT WINDOW oResult.Value
>Next
>RETURN
>
>
>what am I doing wrong extracting the phone number
>
>Thnaks
>
>Peter
___
Peter,
On first sight, remove the first and the last char from your pattern
Your pattern does not search in the string, you force the whole string to match with ^ and $
Gregory