Hi
I use a regular expression with regexp to do selects on my tables when i am searching.
The search phrase can be any expresssion that the user enters - so he can enter a regular expression.
However if someone searches for say
av[,
then the query returns an error saying 'invalid regular expression : unmatched parentheses' (not exact msg, but u get the idea)
So I want to validate the search phrase before executing select, ie, i need a function or code that will tell me if the phrase is a proper regular expression, correct grammatically.
Thanx.
I use a regular expression with regexp to do selects on my tables when i am searching.
The search phrase can be any expresssion that the user enters - so he can enter a regular expression.
However if someone searches for say
av[,
then the query returns an error saying 'invalid regular expression : unmatched parentheses' (not exact msg, but u get the idea)
So I want to validate the search phrase before executing select, ie, i need a function or code that will tell me if the phrase is a proper regular expression, correct grammatically.
Thanx.