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
Get step-by-step solutions from verified subject matter experts
