$1 is set to the part that matches the regex in between the brackets.if ($str =~ m/(thispart)/) { $found = $1; }
In reply to Re: Get a known substring from a string
by Anonymous Monk
in thread Get a known substring from a string
by jake7176
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |