Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

601.Advanced search and replace -- How to add a '*' at the beginning of each line that contains keyword "PASS"?

User: editor -- 2010-08-30          << 600  602 >>
Hits: 2762
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to add a asterisk(*) at the beginning of each line that contains keyword "PASS" in a text file?
Input Sample:
...... PASS... 
...FAIL 
...... 
....PASS 
Output Sample:
* ...... PASS... 
...FAIL 
...... 
* ....PASS 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'replace' window 
* set 'replace unit' to 'Line' 
* in 'search for pattern', enter: 
 
* in 'replace with pattern', enter: 
 
3. click 'Replace', done!

Screenshot 1:  Replace_Window


Similar Examples:
How to find the maximum number in each line that contains 3 numbers? (61%)
How the remove text from the beginning of each line before a certain string? (59%)
How to add a line number at the beginning of each line? (59%)
How to add different words at the beginning of each line? (57%)
How to extract all lines that contain words in a list? (55%)
How to move a string from the beginning of the line to the end of the line? (55%)
How to add a timestamp at the beginning of multiple text files? (55%)
How to extract all lines that contain words A and B and C? (55%)

Check Demo of Advanced search and replace
Keywords:
asterisk  pass  keyword  key  contains  at the beginning  beginning  ass  begin  contain  keyword line  the keyword  keyword file  add to beginning  add text beginning  beginning of line  beginning line  add text each line