iv) i) iv) i) ii) iii) vi) vii) i) ii) In this assignment, we will learn regular expressions or in short, Regex. We will
Posted: Sun Jul 03, 2022 10:00 am
iv) i) iv) i) ii) iii) vi) vii) i) ii) In this assignment, we will learn regular expressions or in short, Regex. We will do 5 different regex problems very similar to each other and combine them to a single code ultimately. We will use a menu which will have a range 1 to 6, 1-5 for different regex and 6 for exit. We will of course keep the entire code in an infinite while or for loop so that we can run the program and reuse specific regex. Try to keep each regex in each user-defined function and will call the functions based on menu selection. Good luck! 1. Validate a password using the following criteria: starts with the word "PAS" in capital characters contains at least 10 characters contains at least one special character no consecutive characters can be used. 2. Validate UIU CSE/EEE/BBA faculty email address. Valid [email protected] [email protected] [email protected] 3. Validate the following string using the following criteria: start with your actual first name in capital characters then, three digits in range 300-400 then, a word "CSE" or "UIU" or "COM" then, an operator +, - or nothing end with a single letter(small letter) only. 4. Validate the following string using the following criteria: Start with @or # Then, an even number with 3 digits Then, 3 consecutive small letters(without special characters) Then, any one of these two boolean word "0" or "1" Then, 1 capital character(without special characters) Then, last 3 digits of your student id (i.e. for id 011173252, 252 would be last 3 digits) End with the string "gmail.com" 5. Validate UIU student ID. consider department CSE, BBA, EEE and CS. consider year 2005 to 2022 Valid PASandPd@adn PAS1261436436# PAS@1a2a1f2158 Valid KHALED350CSE+a KARIM301UIU-z RAHIM400COMz 011201222 111213111 021192555 Valid @132abc1A133gmail.com #754pqr0B224gmail.com @626xyz1C720gmail.com Valid