Reputation: 227
I have a text file with the structure of:
100167.0000000 100004.2656250 33.0000000
100200.9062500 100083.2187500 30.0000000
200867.9218750 100361.1406250 27.0000000
200374.2500000 100778.3750000 24.0000000
I want to remove the blank space in the front of each line, using the notepad, or notepad++.
How Can I select the front blank space and delete it?
I just want to select the front space, not all the space. More example to make the question better:
What should I do If I want to select all the front space (across the line) using a mouse?
Upvotes: 0
Views: 2218
Reputation: 227
In Notepad++, to select the space only in multiple lines, we can use the alt
button.
The procedures are:
alt
button.Thank you.
NB. Some people prefer to use the term "Highlight" instead of "Select". In this case, both of them have the same meaning.
Upvotes: 3
Reputation: 15501
In Notepad++, set the "Regular expression" radio button and put this in the "Find what" box:
^\s*
And leave the "Replace with" box empty.
You'll have to read about "regular expressions" to get all the details, but for the above:
^ means only match at the beginning of the line
\s means match any whitespace char (including space and tab)
* means to match zero or more of the preceeding
So, in English, it says "match zero or more whitespace chars at the beginning of the line".
Upvotes: 2
Reputation: 5713
As far as I remember Notepad++ have "extended" replace option, so you can try to replace:
"\r\n "
where, \r\n means new line and a few spaces in this line - to empty string (but of course without "" ;)
Upvotes: 0