grep command & shell procedure's

hello, i'm trying to pluck words from a list that have exactly 3 occurances of a specified letter. I've come up with this :
grep -i .*$1.*$1.*$1.*
But this also selects words with 4 or more, any tips?

I'm putting this into a shell procedure and want to be able to add a switch before I put the letter to searched in ($1), if you could point me to the correct manual page to read up on that it would be great, I'm using bourne shell.

Thanks in advance

Try using a ? instead of the * The ? is for only one character place where as * is for multiple. I think this is will work in scripts also. (Haven't written any scripts yet)