my $line='BRG calif. etc 0000 00000';
my $one='BRG';
my $two='0000 ';
$a=~/$one(.*)$two/;
print $1 if($1);
Note that my $two has a space after these zeroes. If there would be just 0000 (and no space after them) than the regexp consider as 0000 (your point B) the final 0000 of $line.
Anca
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.