Well, (,\d) means "find a comma followed y one or more digits."
So it will match ",2" or ",41".
The (\1+) means "find the same thing matched by (,\d) one or more times.
So if you have ",2,2,2" that expression will first find ",2" and then see that there are two more occurrences of ",2" and end up matching all of ",2,2,2".
The only flaw in this code is that if NO string is found more than once, it will report back with [b[This number appaers 0 times[/b] (of course, the word should be "appears").
It also doesn't fulfill the requirement that the number be found more than half the time, but that's easy to do in a separate test.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.