python - Verify Regex Pattern to find email address in HTML -


new regex , python: verify what's wrong below regex pattern find email address in html code:

test_str = ("html-code")  regex = re.compile(r"[\w._%+-]{1-20}@[\w.-]{2,20}.[a-za-z]{2,3}") matches = re.findall(regex, test_str) 

getting out empty array.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -