Result Size: 625 x 571
demo_regex.py:
x
 
import re
#Check if the string starts with "The" and ends with "Spain":
txt = "The rain in Spain"
x = re.search("^The.*Spain$", txt)
if (x):
  print("YES! We have a match!")
else:
  print("No match")
C:\Users\My Name>python demo_regex.py
YES! We have a match!