jTrigger
02-20-2003, 04:38 AM
Hi!
I'm having problem in using regular exression when a user entered a string with parentheses. I want the regexp to accept what ever the user entered.
I used this to my incremental search.
e.g.
srcstring = 'sample (x)' // string entered by user
var regExpr = eval("/^" + srcString + "/"); /*regular expression pattern*/
selElementText.search(regExpr) /* search the string in select element*/
here's the error: expected ')' character in regular expresssion.
I'm having problem in using regular exression when a user entered a string with parentheses. I want the regexp to accept what ever the user entered.
I used this to my incremental search.
e.g.
srcstring = 'sample (x)' // string entered by user
var regExpr = eval("/^" + srcString + "/"); /*regular expression pattern*/
selElementText.search(regExpr) /* search the string in select element*/
here's the error: expected ')' character in regular expresssion.