Menu

NUL search and replace

2009-04-02
2012-11-13
  • scott wallace

    scott wallace - 2009-04-02

    I'm new to Notepad++ and have some corrupted log files I'm attempting to strip the NUL characters from.  In Notepad++ it shows up as NUL (white letters black background)

    Can anyone tell me a way to do this.  

     
    • Taomyn

      Taomyn - 2009-04-14

      This is great to know, but why can't N++ handle uncorrupted files similar to this? Perhaps I'm missing a menu option to tell N++ to display it properly.

      For example, the CHKDSK log file created by my Windows 2008 Server shows with NUL between each and every character, where as opening the same file in standard Notepad shows correctly.

       
    • Greg

      Greg - 2009-04-03

      Welcome to the N++ community, Scott.

      You can remove the NUL characters with regular expressions. I'm not sure what it will do to your file as some of the NULs may be valid. Anyway, here's how.

      Select Replace (Ctrl/H)
      Find what: \x00
      Replace with: <leave blank>
      Click on radio button Regular expression
      Click on Replace All

       
MongoDB Logo MongoDB