I recently received several documents that contained multiple (and irregular) numbers of spaces between each word. When I asked the original author about this, they said that they typed out the document and that they struggle with the gap a space produces being too small. As I was meant to extract the information out of these documents and use it in a report and create a spreadsheet out of these I wanted to get rid of the multiple spaces so that I wouldn't have to re-type the whole thing.
Microsoft office offers several ways to do this, however many of them do not work with OpenOffice or LibreOffice. This is such a simple problem, but there are not many solutions to this shown online.
A simple fix is to use the
Find & Replace tool (Ctrl + H or edit > Find & Replace from the top menu). This will bring up a window (shown below). In the
Search for field enter
[:space:]+ (be sure to include the symbols) and then in the
Replace With field put in a space. Click on the + symbol beside
Other Options and select
Regular expressions ( a tick should appear in the box beside it.
Click on
Replace All and your document should now be sorted, all of the multiple spaces will be replaced by a single space.
I recently received several documents that contained multiple (and irregular) numbers of spaces between each word. When I asked the original author about this, they said that they typed out the document and that they struggle with the gap a space produces being too small. As I was meant to extract the information out of these documents and use it in a report and create a spreadsheet out of these I wanted to get rid of the multiple spaces so that I wouldn't have to re-type the whole thing.
Microsoft office offers several ways to do this, however many of them do not work with OpenOffice or LibreOffice. This is such a simple problem, but there are not many solutions to this shown online.
A simple fix is to use the
Find & Replace tool (Ctrl + H or edit > Find & Replace from the top menu). This will bring up a window (shown below). In the
Search for field enter
[:space:]+ (be sure to include the symbols) and then in the
Replace With field put in a space. Click on the + symbol beside
Other Options and select
Regular expressions ( a tick should appear in the box beside it.
Click on
Replace All and your document should now be sorted, all of the multiple spaces will be replaced by a single space.
Removing multiple spaces in OpenOffice/LibreOffice
I do this often in TextWrangler, but didn't know it could be done in LibreOffice. Will have to remember this.
ReplyDeleteIt didn't work.
Deletethank you
ReplyDeletethis really helps me
using regular expresion find and replace \s+ by \s
ReplyDeleteadd the link ,,,,,,,,,,
ReplyDeletefindernow
ReplyDeletegoogle
google find
google findernow
findernow google
google india
findernow
ReplyDeletegoogle
google find
google findernow
findernow google
google india
google all
ReplyDeleteall google
google all see
all google finder
google bing all
google all
ReplyDeleteall google
google all see
all google finder
google bing all
Remember, this will obliterate any and all space-based indentation in your document.
ReplyDeleteSo use with care.
How can I remove just the space before starts word?
ReplyDeleteThank you SO MUCH! You've saved me so much time.
ReplyDelete