Answers for "python matching string pattern"

2

python pattern matching example

import re
pattern = re.compile('[a-zA-Z ]+')		# a...z A...Z and space allowed
message = "Weather is nice"
if pattern.match(message).group() == message:
    print("match")
else:
    print("no match")
Posted by: Guest on May-13-2021

Code answers related to "python matching string pattern"

Python Answers by Framework

Browse Popular Code Answers by Language