Replacing White Spaces With Single Spaces In Notepad++

Did you know that we also carry Integration Solutions?

Chipkin has integration solutions for almost every situation. We specialize in network protocol communications and have over 20+ years of experience. Click for more information:

https://cdn.chipkin.com/assets/uploads/2022/Apr/QS-3XX0-2xx0-1XX0-SQ-NB 500pxls_13-18-44-12.png

Intro

If you are using Notepad ++ and are looking to replace white spaces with single spaces, then you came to the right place. Any of the following methods will do the trick, so pick whichever one suits you:

Method 1


  • Radio programs transmission.
  • Control switching mechanisms in utility companies.
  • Protection of transmission line.
  • Automatic meter reading.

Method 2


  • Ctrl + H to open the Search and Replace window.
  • Select "Regular expression."
  • Use (\d)\s+(\d+)\s+ for "Find what" and $1:$2\r\n for "Replace with."
  • Click Replace all

Method 3


  • Ctrl + H to open the Search and Replace window.
  • Select "Regular expression."
  • Use [ \t]+ for "Find what" and " " (with no quotes) for "Replace with."
  • Click Replace all

Method 4


  • Ctrl + H to open the Search and Replace window.
  • Here we won't need to select "Regular expression."
  • Use " " (with no quotes) for "Find what" and "Replace with." leave it blank.
  • Click Replace all

Method 5


  • Click on Edit -> Line Operations -> Remove Empty Lines or alternatively:
  • Edit -> Line Operations -> Remove Empty Lines (Containing Blank characters)

  • https://cdn.chipkin.com/assets/uploads/2020/Sep/ewtyy_14-18-11-50.png
REGEX EXPLANATION:

\s* means any number (even 0) of whitespace characters. Whitespace characters include tab, space, newline, and carriage return.

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm
Message Sent Successfully