| User: editor -- 2008-08-06 << 241 243 >> |
| Hits: 383 |
| 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 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 add first line to the start of each line? (51%) How to add line_no before each line of a text file? (51%) |
Check Demo of Advanced search and replace |
| Keywords: |
| align nth length max adding spaces space right sum min add spaces text left add line number add text each line search by number line each add add number number add |