Help for this page

Select Code to Download


  1. or download this
     m   Treat string as multiple lines.  That is, change "^" and "$" from
         matching the start or end of the string to matching the start or
         end of any line anywhere within the string.
    
  2. or download this
    $ perl -Mre=debug -wle'"ABC\nDEF" =~ m/C(?:$)^D/m'
    Freeing REx: `","'
    Compiling REx `C(?:$)^D'
    ...
    Did not find anchored substr "CD"...
    Match rejected by optimizer
    Freeing REx: `"C(?:$)^D"'
    
  3. or download this
    $ perl -Mre=debug -wle'"ABC\nDEF" =~ m/C(?:$)$\?^D/m'
    Freeing REx: `","'
    Omitting $` $& $' support.
    ...
    D> <EF>         | 11:    END
    Match successful!
    Freeing REx: `"C(?:$)\n?^D"'