Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1143.Text file parser -- How to extract numbers in specified position and join with comma?

User: sam -- 2013-10-28          << 1142  1144 >>
Hits: 1223
Type: Text file parser   
Search all Text file parser examples
Description:
under colum "vlan", abstract/export all unduplicate "number" with comma
Input Sample:
Port      Name               Status       Vlan       Duplex  Speed Type
Gi0/17                       disabled     1            auto   auto 10/100
Gi0/18                       disabled     1            auto   auto 10/100
Gi0/19                       disabled     1            auto   auto 10/100
Gi0/20    Security Camera    connected    134        a-full  a-100 10/100
Gi0/21    AP1232-WFCL2       connected    216        a-full  a-100 10/100/1000BaseTX
Gi0/22    Hydro Meter
Output Sample:
1,134,216,144,150
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Following steps are trying to extract all numbers at the position of 43 chars, and join them with comma:
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:

* set 'replace with pattern' to:

or


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

Note: 
* if you do not want to remove duplicate, you can just use:


Screenshot 1:  Replace_Window


Similar Examples:
How to search and sum the numbers at specified position in a text file? (70%)
How to find numbers in specified location and sort them? (68%)
How to extract lines with specific words in first column? (66%)
How to extract all lines by specified words in group? (65%)
How to extract lines containg specified words from many files? (62%)
How to count the number of specified part in each line? (62%)
How to extract specified columns from blocks of text? (60%)
How to extract all lines with specified date range from text file? (60%)

Check Demo of Text file parser
Keywords:
vlan  keys  extract numbers  abs  position  grep  export  dictionary  extract number  diction  remove duplicate numbers  extract text and numbers  specified chars  replace position  remove all numbers  remove comma  remove text numbers  remove numbers