Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
1128.Advanced search and replace -- How to delete line with specific columns in specific range?
User:
shanfeng -- 2013-09-11
<< 1127
1129 >>
Hits:
3206
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to delete specified lines with some conditions:if the second column is a,and the third column is b,then delete the lines if a<1 or a>3; or b<9 or b>11
Input Sample:
c 1 9
c 2 10
c 2 8
c 4 10
c 2 13
Output Sample:
c 1 9
c 2 10
Answer:
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 'if' to:
($match[2]<1 or $match[2]>3) or ($match[3]<9 or $match[3]>11)
3. click 'replace', done.
Screenshot 1: Replace_Window
Similar Examples:
How to replace specific column with specific rule in csv file?
(71%)
How to add some number to the specific column in csv file?
(66%)
How to delete last column in a csv file?
(63%)
How to insert a line after specific lines in a text file?
(63%)
How to remove/delete lines of csv file with column C containing 'CCC'?
(62%)
How to delete the second column in multiple text files?
(60%)
How to delete rows with same column as previous line?
(59%)
How to add a space at the specific location of each line?
(59%)
Check Demo of
Advanced search and replace
Keywords:
conditions
condition
third
delete specified
range
second column
specific
columns
second
how to delete line
delete range lines
delete second column
replace text in specified range
delete columns
delete second line
replace in specified range
delete column
column delete