Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

353.Advanced search and replace -- How to replace the second character of every line to 4 in a text file?

User: jiang -- 2009-09-23          << 352  354 >>
Hits: 3635
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace the second character of every line to 4 in a text file? 
Input Sample:
31313252321232 
35343212301512 
36373282324212
Output Sample:
34313252321232 
34343212301512 
34373282324212
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. press ctrl-o open source text file 
2. press ctrl-h open replace dialog 
* select "replace unit" to "Chars" 
* select "replace scope" to "Line" 
* set "unit number filter" to  
* set "replace with pattern" to  
3. click "Replace", done! 
 
Note: if you want to change other column(like 14), you can set unit number to other value(like 14).
Download Script:  scripts/353.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to replace the second character of every line to 4 in multiple files? (91%)
How to remove the first 10 characters of each line in text file? (71%)
How to calculate the summaries of every line in a txt file? (69%)
How to replace the content of XML with a list of words from text file? (67%)
How to replace or remove 3 lines randomly in a text file? (67%)
How to delete duplicate numbers in every line in text file? (67%)
How to replace the second column in a tab seperated file? (65%)
How to add a page number after every 40 lines in a text file? (65%)

Check Demo of Advanced search and replace
Keywords:
unit number filter  number filter  second  every line  replace scope  scope  every  filter  very  value  replace second character  every other line  replace every second  every other  every character  scope filter  replace in second line  replace second line