How to count number show up


i have txt above,

i want to count to get how many number show up (not eyes way )

how to use neovim way to get 10 (mean has 10 numbers show up)

Use this command: :%s/\d\+//gn

1 Like

if text is a region

'<,'>/\d\+//gn no work

how to do

You can use / and a regular expression. For example:


where \d is a digit and \+ means one or more occurrences (one or more digits after each other).
The number of matches is displayed on the right of the command line: [x/10]

You forgot to add the s.



you are right :smiley: