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
1066.Advanced search and replace -- How to filter out the duplicate number after the specified keywords?
User:
sam -- 2013-03-18
<< 1065
1067 >>
Hits:
3023
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to filter out the duplicate number ?
Input Sample:
!
interface GigabitEthernet1
switchport access vlan 8
!
!
interface GigabitEthernet2
switchport access vlan 9
!
!
interface GigabitEthernet3
switchport access vlan 8
Output Sample:
8 9
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 with pattern' to:
sort_by_word(join('\n',$match=~/switchport access vlan (\d+)/g),1,'uniq')
3. click 'replace', done.
4. ctrl-s save to file
Screenshot 1: Replace_Window
Similar Examples:
How to filter out all web pages that does not contain specified words?
(61%)
How to list out all the lines which has having specified keyword.
(59%)
How to find maximum and minimum number out of specified column?
(58%)
How to rip out all but line 1 and specified text?
(57%)
How to count the number of lines under each specified pattern?
(57%)
How to sort the text by the number of specific word in each line?
(57%)
How to find out all lines that appeared specified number of times?
(57%)
How to replace the certain column with specified words?
(56%)
Check Demo of
Advanced search and replace
Keywords:
vlan
switch
access
keywords
keyword
key
acc
duplicate
duplicat
dupl
keywords replace
after number
duplicate text
replace duplicate
duplicate file
replace text after
after text
text pattern filter