Removing spaces

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
notbob
Posts: 10
Joined: Sat Oct 15, 2005 6:36 am

Removing spaces

Post by notbob »

I have a large text file. Many of the lines in the text files have spaces on the left before the text actually starts. The number of spaces varies from line to line.

I would like to have it all aligned on the far left of the file. Is there any easy way to do this?

As an example, below is some text (note each period at the beginning of the line actually represents a space)

.......This is line 1
....This is line 2
................This is line 3
..........................This is line 4

Would like to have the following after editing.

This is line 1
This is line 2
This is line 3
This is line 4

Thank you

Jason
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Find: ^_+
Where _=space.
Replace with nothing. Tick "Regular expression" and hit "Replace All". HTH
Then I open up and see
the person fumbling here is me
a different way to be
Post Reply