Write the regular expression that will help us count how many div elements are there in a string. Use the character class \W in your expression.
txt1 = "<div>Hello.</div><div>My name is <b>George</b>.</div>"
txt2 = "<div><h1>The Word for Today</h1><div>aardvark</div></div>"
txt3 = "<div></div>"
pattern = "yourregularexpressionhere"
len(re.findall(pattern, txt1)) ➞ 2
len(re.findall(pattern, txt2)) ➞ 2
len(re.findall(pattern, txt3)) ➞ 1<div>Hello.</div>.import re from the code.