What you need to do is place the regex inside the m// operator, then print the match. If you are trying a substitution, then use the s// operator. Eval is unnecesarry.
Cheers,$user_text =~ m/$user_regex/; print $&;
In reply to Re: Question on evaulating a user built regex
by erikharrison
in thread Question on evaulating a user built regex
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |