| User: editor -- 2008-05-13 << 94 96 >> |
| Hits: 512 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to replace the characters in fixed position in each line? I want to multiply character 6,7 by 2 in each line. |
| Input Sample: |
| 1234501abcde 1234502abcde 1234503abcde ... |
| Output Sample: |
| 1234502abcde 1234504abcde 1234506abcde ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source file 2. ctrl-h open replace dialog, in 'Replace' page, 1)set 'replace unit' to 'Line' 2)set 'Search for Pattern': means for every line 3)set 'Replace with Pattern': 3. Click 'Replace', that's ok! Notes: chars($match,1,5) means characters 1 to 5 calc(chars($match,6,7)*2,"02") means characters 6,7 multiplied by 2, lengh=2 chars($match,8,-1) means characters 8 to last |
| Download Script: scripts/95.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to replace bytes in the specific postion of many binary files? (64%) How to add a space at the specific location of each line? (62%) How to add a space after the 15 character of each line? (62%) How to reverse the order of characters in each line of text? (61%) How to search and sum the numbers at specified position in a text file? (60%) How to replace the first 3 spaces into comma in each line of text? (60%) How to replace the all word "test" with the first word in same line? (60%) Is it possible to remove/delete characters at specified location(such as 1,3,5) of each line? (60%) |
Check Demo of Advanced search and replace |
| Keywords: |
| position multiply fixed every line last every las characters calc chars search in each line by position replace position multiply file every character last line line last 1 character in each line replace last |