Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    # to do something perl can do much better...
    echo `expr match "$string" 'abc[A-Z]*.2'` ;
    echo `expr match "$string" 'abc[A-Z]*2'` ;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my $string = "abcABC123ABCabc";
    print "Regex1: ", $string =~ /abc[A-Z]*.2/, "\n" ;
    print "Regex2: ", $string =~ /abc[A-Z]*2/, "\n";
    
  3. or download this
    Regex1: 1
    Regex2: