If your version of Perl is sufficiently new, you can use the qr// quoting mechanism to specify a regex. Otherwise, ordinary strings can be interpolated into regexen, and what you have written above will work, if you enclose the (hello) in quotes.
$regex1 = qr/(hello)/;
# or $regex1 = '(hello)';
$test = 'hello there!';
print $1 if /$regex1/;
The PerlMonk tr/// Advocate