Jan-21-2018, 07:28 PM
hi,
I want to validate that the below string should only contain 0-9A-Za-z. Not sure how the space can be ignored and through the invalid message if it contains -
Please help
I want to validate that the below string should only contain 0-9A-Za-z. Not sure how the space can be ignored and through the invalid message if it contains -
Please help
import re inp1="input should only contain a to z 1 to 9 A to Z-" if not re.search('[0-9A-Za-z]',inp1): print "input invalid" else: print "input is valid"Thanks in advance!