How to count number show up

[
 11112,811311
 11113,11121
 81112,11111111
 11102,1111
 21112,71111
 ]

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:

/\d\+

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.

:'<,'>s/\d\+//gn

:'<,'>s/\d\+//gn

you are right :smiley: