Help for this page

Select Code to Download


  1. or download this
    my $fn = shift;
    exit 1 if not defined $fn;
    ...
    my $count = () = $input =~ m/mul\(\d{1,3},\d{1,3}\)/g;
    
    print "Found $count matches.\n";
    
  2. or download this
    import re
    import sys
    ...
    count = len(mul_re.findall(input))
    
    print(f"Found {count} matches.")