How to validate the given boost regular expression
Posted on 2007-10-16
Im doing filtering the files/folders path. i use boost library to filter the given files/folders path. im using the Boost::Regex_Search() function for this. My question is how to validate the given regular expression is valid one. for example '^' is valid one. but if somebody giving the wrong one like "))))((()(()()". i need to validate this and give a alert to user that you are giving the wrog regular expression. i searched in Boost documentation and found regex_error_types. but im bit of confusing in that. is it possible to validate regular expressions using PHP or AJAX or Java script.
Please avoid ereg() functions.
Thanks in Advance...