Just test the regex in an eval to make sure it compiles, as suggested earlier. And do not do the following: use re 'eval'; because then you could end up evalling arbitrary code in the user's regex.
In reply to Re: Checking user input on dynamic regular expressions
by chipmunk
in thread Checking user input on dynamic regular expressions
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |