Replacing White Spaces With Single Spaces In Notepad++

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)

REGEX EXPLANATION:

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


Gateway Selector

Select your combination of protocols.
Protocol 1
Protocol 2

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