|User: editor -- 2008-07-30 << 237 239 >>|
|Type: Advanced search and replace|
|Search all Advanced search and replace examples|
|How to add some spaces at the beginning of each line to align the text to the center in a pure text file.|
|Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.|
|Assuming max line lenth is 40, so we need to add 40/2-length/2 number of spaces at begin. |
1. ctrl-o open source text file
2. ctrl-h open 'Replace' dialog.
* set "Replace Unit" to "Line"
* set "Search for pattern" to:
* set "Replace with pattern" to:
3. Click "Replace", done!
|Download Script: scripts/238.rst.zip|
Screenshot 1: Replace_Window
|How to add a single space after each character in a text file? (69%)|
How to add specified text to the begin and end of many text files? (68%)
How to sort the numbers in each line by the descending order in a text file? (63%)
How to reverse all cases of letters in a text file? (62%)
How to replace the content of XML with a list of words from text file? (61%)
How to batch replace the last 5 "old" with "new" in a text file? (61%)
How to add 3 spaces after every 9 characters in a text file? (61%)
How to replace a word with a list of words repeatly in a text file? (60%)
Check Demo of Advanced search and replace
|align add spaces length add space nth max spaces space at the beginning beginning spaces align add spaces text file add spaces in a text file add to beginning add text beginning add a number each line add line number beginning of line|