I want to identify a webelement with DP The code looks like below
odesc("micclass").Value = "WebElement"
odesc("innertext").value=pdtname&" Frequency:.*Add or Cancel"
odesc("html tag").Value ="xyz"
Here the pdt name is coming from query it contains special characters like '$' or '(' or ''' and since these characters are there the set olist is not working as regular exp is not working since these metacharacters are there.
For ex the pdtname will be "dell laptop (3 for $1350)" or sometimes like "mouse ( ball one) (2 for $30)" so to work i tried with \Q...\E for escaping these characters but it didnt work eg
odesc("innertext").value="\Q"&pdtname&"\E Frequency:.*Add or Cancel"
so inshort my question is what would be the reg exp pattern for escaping these characters for ex what should be the req exp pattern for "dell laptop (3 for $1350)"
Something wrong here? any help would be appreciated.