| || |
Search for a char in a string
This question is not very related to QTP but i faced it while working with it..
i want to search in string for these 2 chars (" , \), i'm using the VBScript..
i dont know the right syntax..DO YOU?
the statment should looks like this:
if (InStr(1,MyStr, "/") = 0) OR _
(InStr (1,MyStr, " " ") = 0)then .....
as far as i remember, there should be en escape char or something like this..
Thanks in advance.
Re: Search for a char in a string
Try the Char() function instead of the literal.
Char(#) where # is the character code of the character you are wanting to search for. QTP's VBScript help has a copy of the ASCII character codes.