RegEx در پایتون(RegEx in Python)

وقتی ماژول re را وارد کردید،
می تواند شروع به استفاده از عبارات منظم کند:




مثال


Search the string to see if it starts with "The" and ends with "Spain":



import
re

txt = "The rain in Spain"
x = re.search("^The.*Spain$", txt)