Are you sure you want to evaluate a user regexp? The user can insert a (?{...}) construct to include some Perl executable code, which can in turn include a call to system, or backticks, which can contain very bad things.
And there is more than one way to do nasty things.
The user can write a Denial-of-Service regexp,
a regexp which backtracks a lot and locks your machine.
See Mastering Regular Expressions page 140+
(the book with two owls on the cover)
Update
Yes, Perlplexer, you are right. The security hazards
are mostly irrelevant in a Perl/Tk program. Yet,
my warning still holds for any monk who would use
the answers in this thread for a CGI program (or
any client-server app for that matter). In reply to Re: Question on evaluating a user built regex
by Sweeper
in thread Question on evaulating a user built regex
by Popcorn Dave
For:
Use:
& & < < > > [ [ ] ]