Help for this page

Select Code to Download


  1. or download this
    my $str = "The quick abc";
    
    ...
        print "Matched with newline using $regex\n" if "$str\n" =~ $regex;
        print "Matched without newline using $regex\n" if $str =~ $regex;
    }
    
  2. or download this
    Matched without newline using \babc\z
    Matched with newline using \babc\Z
    Matched without newline using \babc\Z