in reply to Question on evaulating a user built regex
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 $&;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Question on evaulating a user built regex
by Popcorn Dave (Abbot) on Apr 22, 2002 at 16:05 UTC | |
by BrentDax (Hermit) on Apr 22, 2002 at 21:21 UTC |