Help for this page

Select Code to Download


  1. or download this
    >perl -wMstrict -le
    "my $s = qq{\n\n};
    ...
     print $s =~ /(\n$\n)/m ? qq{:$1:} : 'no match';
    "
    no match
    
  2. or download this
    >perl -wMstrict -le
    "my $s = qq{\n\n};
    ...
    :
    
    :
    
  3. or download this
    string=<a\n>
       no modifier: regex=/^a$\n/
    ...
       [ ... ]
       m modifier (multi line mode): regex=/^a$\n/m
         match => $ matches only boundary, \n matches newline
    
  4. or download this
    >perl -wMstrict -le
    "my $s = qq{a\n};
    ...
    "
    NO match
    NO match
    
  5. or download this
    >perl -wMstrict -le
    "my $s = qq{a\n};
    ...
    "
       match
       match