Question: How to validate a string in python that must contains numbers and characters. Also only contains one special character dot and one special character colon.

How to validate a string in python that must contains numbers and characters. Also only contains one special character dot and one special character colon. For example: MT:Y.K90ADB00KA0648G00 this is a valid string. It contains both numbers and characters and also contains only one colon and only one dot. MT:Y.K90ADB00KA0648G00= This is invalid, it contains another special character MT Y.K90ADB00KA0648G00 This is invalid, it doesn't have a colon and has white space MT:Y.KADBKA This is invalid, it doesn't contain numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!