in reply to Re: Checking user input on dynamic regular expressions
in thread Checking user input on dynamic regular expressions

$reg_exp = '\d{4}'; $string = 'The year is 2001, the month is April.'; $req_exp = quotemeta $req_exp; $string =~ /($req_exp)/; print $1;
That doesn't print '2001', because it's trying to match \\d\{4\} instead of \d{4}

cLive ;-)