>>999-999-999-999-99 >>>>this pattern may occur 0 to n times in the field. There may not be any terminating characters separating other data from this pattern(s).
>>oRegEx = CREATEOBJECT("VBScript.RegExp") >>oRegEx.Pattern = "\d{3}-\d{3}-\d{3}-\d{3}-\d{2}" >>oMatches = oregex.execute(memofld) >>? oMatches.count >>>>but count is never more than 1 !
>>Sample Data: >>this should return 2 >>071-027-100-005-00071-027-100-010-00PARCELS 1-A,2 >> >>this should return 2 >>071-027-100-005-00aaxx071-027-100-010-00PARCELS 1-A,2 >> >>this should return 1 >>071-027-100-010-00PARCELS 1-A,2 >> >>this should return 1 >>aaxx071-027-100-010-00PARCELS 1-A,2 >>>>
oRegEx.Global = .T.
By not setting this it only check for the first match.