The best solution is to not overfeed your fish. Excess food will just contribute to the population explosion of the snails.
You can use a generous piece of zucchini or cucumber, spear it with a fork and let it dangle on a string/fishing line in the bottom of the tank. Once the snails congregate on the food, retrieve it and dispose of the snails. If you don't want the snails and don't have a friend that will take them, I suggest putting them in a baggie, crushing them, freeze them and then dispose of them in the trash. You don't want to flush them or release them to the environment.