Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1292.Regular expression replace -- How to add different words at the beginning of each line?

User: Chou -- 2015-04-05          << 1291  1293 >>
Hits: 896
Type: Regular expression replace   
Search all Regular expression replace examples
How to add different words at the beginning of each line and same at the end?
Input Sample:
I love you 
You love me
she loves him
He loves  her
Output Sample:
<5201314>I love you <520> 
<5202628>You love me<520> 
<5201314>she loves him<520> 
<5202628>He loves  her<520> 
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'search for pattern' to:

* set 'replace with pattern' to:

* click 'advanced' tab, set 'reun following at the beginning of replace' to:

3. click 'replace', done

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Advanced_Window

Similar Examples:
How to add a line number at the beginning of each line? (76%)
How to insert a word or phrase to the begining of each line? (76%)
How to add a word "myword" at the end of each line? (67%)
How to batch insert filename at start/beginning of each lines? (65%)
How to add a <BR> at the end of each line? (65%)
How to remove space at beginning of the line? (64%)
How to add a star at the beginning and a hash at the end of line? (64%)
How to decrease the first 4 digits in the beginning of each line by 1000? (63%)

Check Demo of Regular expression replace
different words  same  at the beginning  beginning  different  regular expression  expression  tab  begin  regular  add beginning and end file  replace same with different  replace different to same  add words each line  beginning end  add tab  each line to replace different  add text to end of line