Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1083.Text file parser -- How to remove or keep the lines started with a word of number?

User: gaogao -- 2013-05-24          << 1082  1084 >>
Hits: 1336
Type: Text file parser   
Search all Text file parser examples
Description:
How to remove or keep the lines whose first word is a number?
Input Sample:
a.txt
1 23
123@ab.c 22
1a 234
2 33
234 ac
77 abc
abc 123

Output Sample:
c.txt
1 23
2 33
234 ac
77 abc

d.txt
123@ab.c 22
1a 234
abc 123
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
remove lines started with number:
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'search for pattern' to:

3.click 'replace', done.

keep lines started with number:
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:

* uncheck option of "print unmatched unit"
3. click 'replace', done.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Window


Similar Examples:
How to remove the text from line start to the first ":" in each line? (66%)
How to remove all blank lines and lines that started with Name: or Addr:? (65%)
How to remove all lines that are not ended with word "ok" or "done"? (62%)
How to batch remove/delete lines started by "address:"? (61%)
How to replace each line with line have same start word from another file? (59%)
How to remove all the lines appeared in file B,C,D from file A? (59%)
How to remove all the lines that with odd line number for multiple files? (57%)
How to remove/delete all lines with even line number? (57%)

Check Demo of Text file parser
Keywords:
keep lines  keep  first word  lines start  unmatched  remove lines  move lines  unmatch  print  remove line  remove text first word  remove first word  remove first number  keep first  remove lines with word  text parser remove lines  first number is  keep number