regexp /^$/ don't match empty lines

emmanuel
2002-09-13
2013-04-22
  • emmanuel

    emmanuel - 2002-09-13

    so i use this syntax before translating to c
    ( $0 == "" ) { ... }

    It's on an HP-UX system.
    Do you have the same problem ?
    It may be due to my regexp lib ?

     
    • Jim Hart

      Jim Hart - 2002-11-10

      I just discovered the same problem on Mac OS X 10.1, Darwin Kernel Version 5.5, gcc 2.95.2.

       
    • Neil Parks

      Neil Parks - 2003-10-22

      Why not use

         !$0

      to match an empty line?

       
    • Nobody/Anonymous

      > Why not use
      >
      > !$0
      >
      > to match an empty line?

      Because it also matches

      0

       

Log in to post a comment.