Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

107.Advanced search and replace -- How to replace the first 3 characters of each line to fixed characters and add 'a' at the end?

User: editor -- 2008-05-15          << 106  108 >>
Hits: 2055
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace the first 3 characters of each line to fixed characters?
Input Sample:
13524603447  
13482041248  
13472487483  
13651712904  
13706821844  
Output Sample:
p24603447a  
p82041248a  
p72487483a  
p51712904a  
p06821844a 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1.press ctrl-o to open source file    
2.press ctrl-h to open replace dialog, set as follows:    
In 'Replace' page: 
* Set 'Replace Unit' to 'Line'    
* Fill 'Search for pattern' to be:  
  
* Fill 'Replace with pattern' to be:  
 
3. click 'Replace' Button, ok  
Download Script:  scripts/107.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove the first 10 characters of each line in text file? (66%)
How to batch rename files to the first 8 characters of the second line of file content? (63%)
How to replace all half-width characters to full-width characters? (61%)
How to reverse the order of characters in each line of text? (61%)
Replace first char of each line to upper case (61%)
How to replace the first 3 spaces into comma in each line of text? (60%)
How to extract the first 10 and last 10 characters from each line? (58%)
How to extract all lines in which the first character is the same as last character? (57%)

Check Demo of Advanced search and replace
Keywords:
fixed  fix  first 3 char  characters  chars  character  replace the first  the first  first  rst  add characters to end file  add characters at end  end of first line  first line end  add first line  add end of line  add line at end of file  add characters