我把代码改了一下,还是显示格式错误。哪位帮我看看。Window("Flight Reservation").Dialog("Text:=Fax Order No\. \d+").ActiveX("Attached Text:=Fax Number:").Type "0102345678"
FaxNo = Window("Flight Reservation").Dialog("Text:=Fax Order No\. \d+").ActiveX("Text:=Fax Number:").GetROProperty("Text")
Set re = New RegExp
re.pattern = "\([0-9]{3}\)[0-9]{3}-[0-9]{4}"
re.Global = true
re.Ignorecase = true
If re.test(FaxNo) Then
Msgbox "格式正确"
Else
msgbox "格式错误"
End If作者: wangyanzhao 时间: 2011-12-28 13:28 回复 6#zhangchaoy