removing extra spaces between words in a paragraph

hi friends

imagine we have a paragraph which contains 4 lines. in this lines, there are some extra spaces between some words ( instead of standard one space between each words).

is there any solution so that we select the entire paragraph & then click on something so that it removes extra spaces between that words & makes one space between all words?

for example we have following undesirable paragraph:

A terminating error    stops a statement from running. If Windows PowerShell does not handle a terminating error    in some way, Windows PowerShell also      stops running the function or script using the current pipeline. In other      languages, such as C#, terminating errors are referred to as exceptions.      For more information about errors, see about_Errors. 

which we want to become as following:

 A terminating error stops a statement from running. If Windows PowerShell does not handle a terminating error in some way, Windows PowerShell also stops running the function or script using the current pipeline. In other languages, such as C#, terminating errors are referred to as exceptions. For more information about errors, see about_Errors. 

thanks in advanced

March 31st, 2015 5:25pm

How about to use "Find and Replace" function ?

It has lots of nice wildcards/special codes options too.

Find "multiple spaces(between Alpabet or not)" and replace with "single sapce".

Free Windows Admin Tool Kit Click here and download it now
March 31st, 2015 8:24pm

How about to use "Find and Replace" function ?

It has lots of nice wildcards/special codes options too.

Find "multiple spaces(between Alpabet or not)" and replace with "single sapce".

  • Marked as answer by john.s2011 Wednesday, April 01, 2015 6:37 AM
  • Unmarked as answer by john.s2011 Wednesday, April 01, 2015 6:37 AM
April 1st, 2015 12:22am

hi thanks for help.

i solved my problem using your guide. but there is not a such thing:

Find "multiple spaces(between Alpabet or not)" .

may you please put an screenshot of yours here:

Free Windows Admin Tool Kit Click here and download it now
April 1st, 2015 2:38am

hi thanks for help.

i solved my problem using your guide. but there is not a such thing:

Find "multiple spaces(between Alpabet or not)" .

may you please put an screenshot of yours here:

  • Edited by john.s2011 Wednesday, April 01, 2015 6:37 AM
April 1st, 2015 6:36am

Forget about the "(between Alphabet or not)" part.

For you, for now, "Multiple spaces" is good enough.

.

At "Find and Replace" window (using Ctrl h short key),

At "find" edit field, put multiple spaces (let's say two/double spaces), and,

At "replace" edit field, put single space, and Click.

.

That is it.

.

Good Luck !


Free Windows Admin Tool Kit Click here and download it now
April 1st, 2015 6:52am

And repeat the Replace All until no instances are found.

For the wildcards see Replace using wildcards.

April 1st, 2015 7:45am

thanks to both,  but your solution works about specific number of spaces. 

if we want any number of white spaces (two or more) be replaced with one white space, that would be:

find: ( ){2,} 

replace with: \1

Free Windows Admin Tool Kit Click here and download it now
April 1st, 2015 5:56pm

For you, for now

.

empty{2,}

empty

.

should be good enough.

April 1st, 2015 6:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics