Micro Focus QTP (UFT) Forums

Full Version: How to Check Alphanumeric's from webtable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Good Morning to all.

I am having one doubt, For checking a condition from web table cell contains alphanumeric data. In that cell some part is constant and remaining part is changing. How to check this type of condition.

Cell values: To : Islamabad (ISB)
To : Karachi (KHI)
To : Peshawar (PEW)

Here, i done below ways to check the condition,but it is not working.
Code:
If var = "To : " & "[A-Za-z()]" Then
End If.
and
If var = "To : " + "[A-Za-z()]" Then
End If.

Regards,
Ranjit B
Please check the below code
Code:
myvalue = "Karachi (KHI1-)"

Set regexp = New RegExp
regexp.Pattern =  "[^\w\(\)\s]"
regexp.Global = True
regexp.IgnoreCase = True
set Matches = regexp.Execute(myvalue)
msgbox Matches.Count
If Matches.Count = 0 Then
    msgbox "input contains only alphanumerics and spl chars ()"
else
    For Each Match in Matches
        msgbox Match
    Next
End If