Regex to replace multiple blank spaces
top of page

Regex to replace multiple blank spaces


A common problem when editing text is to come across a file that has characters separated with differing numbers of blank spaces. If you want to pull the text together so there's only one blank space between each word you can run a simple Regular Expression search.

Using a text editor like NotePad++ simply enter " +" - two blank spaces followed by the plus sign, and replace this with one blank space.

So text that looks like this:

. . . . get changed to this:


bottom of page