in reply to Input Validation - verifying a string is a properly formatted regular expression
You might want to use use re "eval" if you want your users to use (?{ }) and (??{ }). Of course, you only do that if you can trust your users.my $re = input-from-user; eval {my $dummy = qr/$re/; 1} or die "Illegal regexp";
|
|---|