Nyako
Nyako

Reputation: 45

How do I get Notepad++ to put a consistent single space between words on the same line

I have 10 txt files with 1000 lines each, and they're all horribly formatted, with uneven space between "columns'. I neeed to put a single space between words (names in this case) so Access can turn each row into a proper column . How can I get Notepad to put a consistent one space between these words instead of the varying spacing as seen here:

https://puu.sh/zUSXq/fe11893126.png

Upvotes: 0

Views: 3958

Answers (1)

DeanOC
DeanOC

Reputation: 7262

You can use a regex expression to do this.

  • Select the 'Regular Expression' search mode
  • Enter [ ]+ in the 'Find what' box
  • Enter (a single space) in the 'Replace with' box.

This looks for one or more spaces, and replaces with a single space.

enter image description here

Upvotes: 1

Related Questions