New life from now
28 April, 2010
Counting occurrences of a pattern
Use the
:s
substitute command with the
n
flag (counts number of hits; no changes occur) to count the number of occurrences of a pattern. For example:
:%s/pattern//gn
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment