Help for this page
$a="123abc345" $a=~/123(.*?)345/; # $1 is now equal to "abc" $a=~/(123).*?(345)/; # $1 is now "123" and $2 is "345" $a=~/(xyz).*/; # $1 is still "123" because there was # no match