32849put count into register
- Oct 2, 2002Hello, all!
I would like to count things. I know that if I want to know how many of
something there are, I can hack it with
:%s/\(my favorite regex\)/\1/g
65 substitutions on 23 lines
However, when things are more complex, ie part of a script, how can I do
this cleanly, for example:
count the number of occurrences of regex x
put the count into a register
add to it the number of occurrences of regex y?
- Next post in topic >>