Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    $_ = ",,,,";
    print "Good\n" if /(?:[^,]*,\s*){3}(.*?)\s*,/;
    
  2. or download this
    print "$1\n" if /^(.+?)#,/;
    
  3. or download this
    #!/usr/bin/perl
    
    $_ = "test1, test2#,test3";
    print "$1\n" if /^(.+?)#,/;   # Returns a false positive
    print "$1\n" if /^([^,]+)#,/; # This fails, as we expect