For the text blocking, Handscent has a blacklist feature that can effectively block whole or partial numbers. I just set mine up to block numbers that have the Jamaican scammer area code. Sprint also has a feature to block up to 50 numbers, but I find the handscent more effective because it will block any number with the area code prefix. Sprints service needs specific numbers.
For the phone calls, I believe the Gingerbread update enabled our phones to have a blocked caller feature. So now I just add any number with the scam area code to the blocked list!