| User: editor -- 2008-08-06 << 241 243 >> |
| Hits: 3124 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to align text to the right side in each line by adding spaces at the left? |
| Input Sample: |
| fffffffffffff bbbbbbbbbbbbbbbbbbbb ccccccccccccc ddddddd |
| Output Sample: |
| ___________________________fffffffffffff ____________________bbbbbbbbbbbbbbbbbbbb ___________________________ccccccccccccc _________________________________ddddddd |
| Answer: |
| 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-length 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/242.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to sort the numbers in each line by the descending order in a text file? (56%) How to split a text file by line and rename each file to the line contents? (54%) How to change the number in each line to specified order in a text file? (53%) How to format the CSV file to make each line has same number of elements? (53%) How to duplicate each line 5 times in a text file? (53%) How to split a CSV file with Header according to value of a column? (52%) How to add a number in each line indicating number of words in this line? (52%) How to split a CSV file with Header according to value of column B? (51%) |
Check Demo of Advanced search and replace |
| Keywords: |
| chm align length nth max adding spaces space right ass spaces align add spaces text left add line number by line number search by number number each line add text each line |