Help for this page

Select Code to Download


  1. or download this
    perl -00 -ne 'print if /--Begin--/ && /--End--/' file.txt
    
  2. or download this
    Hello World
    
    ...
    other stuff 
    This is a test
    Good Bye
    
  3. or download this
    --Begin--
    Cat
    and
    Dog
    --End--
    
  4. or download this
    export REX="/--Begin--/ && /--End--/"
    echo $REX
    /--Begin--/ && /--End--/
    
  5. or download this
    perl -00 -ne 'BEGIN {$rex = $ENV{REX}} print if qr($rex)' file.txt
    
  6. or download this
    perl -00 -ne 'BEGIN {$rex = qr($ENV{REX})} print if $rex' file.txt