Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions