Question: This question should be answered in python The function should involve regex and should match the test cases in the picture below Problem 3: Write

This question should be answered in python

The function should involve regex and should match the test cases in the picture below

This question should be answered in python The function should involve regex

Problem 3: Write a function findemail(url) that takes as input a URL, and outputs any email addresses that look like "xxx@XXX.XXX.XXX with any number of dots after the @-sign on this page. The order of the email addresses in the output doesn't matter. Your function should also get around tricks people use to hide their email addresses, such as hangjie@math.ucla.edu hangjie AT math DOT ucla DOT edu hangjie at math dot ucla dot edu hangjie [AT] ucla [DOT] edu hangjie[at]ucla[dot]edu Test cases: url1 = "https://www.math.ucla.edu/"hangjie/contact/" url2 = "https://www.math.ucla.edu/~hangjie/teaching/Winter2019PIC16/regexTest" findemail(url1) should return ["hangjie@math.ucla.edu"); findemail(ur12) should return ["hangjie1@math.ucla.edu", "hangjie2@math.ucla.edu", "hangjie3@math.ucla.edu", "hangjie4@ucla.edu", "hangjie5@ucla.edu", "xxx@xxx.xxx.xxx"]. Problem 3: Write a function findemail(url) that takes as input a URL, and outputs any email addresses that look like "xxx@XXX.XXX.XXX with any number of dots after the @-sign on this page. The order of the email addresses in the output doesn't matter. Your function should also get around tricks people use to hide their email addresses, such as hangjie@math.ucla.edu hangjie AT math DOT ucla DOT edu hangjie at math dot ucla dot edu hangjie [AT] ucla [DOT] edu hangjie[at]ucla[dot]edu Test cases: url1 = "https://www.math.ucla.edu/"hangjie/contact/" url2 = "https://www.math.ucla.edu/~hangjie/teaching/Winter2019PIC16/regexTest" findemail(url1) should return ["hangjie@math.ucla.edu"); findemail(ur12) should return ["hangjie1@math.ucla.edu", "hangjie2@math.ucla.edu", "hangjie3@math.ucla.edu", "hangjie4@ucla.edu", "hangjie5@ucla.edu", "xxx@xxx.xxx.xxx"]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!