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: 316
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 to add a line number at the beginning of each line? (59%)
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%)
How to find all lines in file A that contain words in file B? (53%)
How to replace all numbers 93 in every line that contains gas? (53%)
How to add a number in each line indicating number of words in this line? (53%)
How to change all files that contains words "RRR" to read-only? (52%)

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