| User: editor -- 2010-02-06 << 414 416 >> |
| Hits: 514 |
| Type: Count and statistics |
| Search all Count and statistics examples |
| Description: |
| How to add a number in each line indicating number of words in this line? |
| Input Sample: |
| Character count Batch download Advanced search and replace Batch file rename |
| Output Sample: |
| (2) Character count (2) Batch download (4) Advanced search and replace (3) Batch file rename |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open 'replace' dialog * set 'Replace Unit' to 'Line' * set 'Replace with pattern' to: 3. click 'Replace', done 4. ctrl-s save to file Note: count(string, pattern) return the number of pattern in the string. |
| Download Script: scripts/415.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to sort the numbers in each line by the descending order in a text file? (64%) How to count number of each intial letters in all words in text file? (62%) How to change the number in each line to specified order in a text file? (61%) How to change each number to an increasing number starting from 8? (58%) How to add some number to the specific column in csv file? (58%) How to find the maximum number in each line that contains 3 numbers? (57%) How to sort all the numbers in each line randomly? (55%) How to add sequence number for each non-blank line of a text file? (55%) |
Check Demo of Count and statistics |
| Keywords: |
| toc dic return statist statistics ics string count words each line add a return statistics of number of words add words each line words statistics in text add 1 to string line add words words with number add line number |