My quick attempt is below: obj = re.compile(r'\b[0-9|a-zA-Z]+[\w-]+') >>> re.findall(obj, 'TestThis;1234;Test123AB-x') ['TestThis', '1234', 'Test123AB-x']
This is not working. Requirements: The text must contain a combination of numbers, alphabets and hyphen with at least two of the three elements present. I can use it to set min length using ) {} Thanks, Krishna. -- http://mail.python.org/mailman/listinfo/python-list