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: 407
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 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%)
How to remove every other characters on each line of text? (57%)

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