Python Assignment-5 (Unit 5)
Answer the following questions in detail. Add suitable example wherever necessary.
1. Explain regular expressions and its usage.
2. Discuss all key points for retrieving information from a HTML file. Write a program to explain the
same.
3. Write following programs for regular expressions.
a. To search for string starting with m and having total three characters using the search(),
findall() and map() methods.
b. To split a string into pieces where one or more non alpha numeric characters are found.
c. To replace a string with new string.
d. To retrieve all words 3 or 4 o 5 characters length.
e. To retrieve date of births from a string.
f. To read email ids from a file.
g. To retrieve data from a file and then write that to another file. ()Employee no., Salary)