$regex1 = qr/(hello)/; # or $regex1 = '(hello)'; $test = 'hello there!'; print $1 if /$regex1/;
In reply to Re: Storing Regex Patterns in Scalars
by Roy Johnson
in thread Storing Regex Patterns in Scalars
by iana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |