### Replace Pioneer Home   All Examples   Free Download

RSS: Replace Pioneer Examples

# 1343.Advanced search and replace -- How to count the number of non-empty columns?

 User: Verotiana -- 2016-02-16          << 1342  1344 >> Hits: 1379 Type: Advanced search and replace Search all Advanced search and replace examples Description: Count number of non-empty columns (with a letter) remaining after the last  column. Output the 2nd, 3rd and 4th column followed by the result Input Sample: 14:55:24.043214, 1469, G, R, F, C, B, R, , , , , , , , ,  14:55:24.844215, 1546, F, R, C, B, R, , , , , , , , , ,  14:55:24.913216, 976, E, R, C, B, R, , , , , , , , , ,  14:55:35.691232, 1734, H, R, G, F, C, B, R, , , , , , , , Output Sample: 1469 G R 4  1546 F R 3  976 E R 3 1734 H R 5 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 'replace with pattern' to: words(\$match, 2, 4, ',\s*', ' ') calc(count(\$match, '\S+(,|\$)') - 4)\n 3. click 'replace', done. Screenshot 1:  Replace_Window Similar Examples: How to count the number of consecutive identical lines? (68%)How to calculate the average of numbers of one column? (68%)How to calculate the sum of the numbers in the same column? (63%)How to calculate the percentage of the number in the column1? (62%)How to count the number of ip addresses from each country? (61%)How to calculate the average of the numbers in the same column? (60%)How to count the number of occurrence of every double letters? (59%)How to count number of digits(0-9) in a text file? (59%) Check Demo of Advanced search and replace Keywords: empty  4th  after the last  3rd  2nd  non  letter  columns  the last  after  count columns  count the number of words 2  after number  replace text number count  count words  search by column  words with number  replace text after match