Help for this page

Select Code to Download


  1. or download this
       @LAST_MATCH_END
       @+      
    ...
          subgroup in the last successful match.  
          Contrast with $#+, the number of subgroups 
          in the regular expression.
    
  2. or download this
    pl@nereida:~/Lperltesting$ cat abigail1.pl
    #!/usr/bin/perl
    ...
    "a" =~ /(a)|(b)/;
    print "\@- = (@-)\t length of \@- = ".((scalar @-)."\t last - index = 
    +$#-\n");
    print "\@+ = (@+)\t length of \@+ = ".((scalar @+)."\t last + index = 
    +$#+\n")
    
  3. or download this
    pl@nereida:~/Lperltesting$ perl5.10.1 ./abigail1.pl
    @- = (0, 0)      length of @- = 2        last - index = 1
    ...
    pl@nereida:~/Lperltesting$ perl5.8.8 ./abigail1.pl
    @- = (0, 0)      length of @- = 2        last - index = 1
    @+ = (1, 1, )    length of @+ = 3        last + index = 2