How to check a variable? !/bin/sh shell script

Im really noob in scripting. Im trying to improve.
I want to check if a variable has only alphabetical and numeric characters:

str="3dr>f43fe*" –> Not good
str2="RFEfew3" –> Good

How should I do it?