Complete the following tasks and submit it to the correlating assignment submissions folder. Supply screenshots to support your answers.
Complete a regex tutorial and write regular expressions to match specified patterns.
- A username (contains lowercase letters, digits, -, _; must be between 3 and 15 characters long)Match hello, 23andme
- Skip fo, &name, foo bar
- A password (contains lowercase letters, digits, -, _; must be between 3 and 15 characters long)
- Match password, password2014
- Skip pa$$word, &pass
- A Java variable name (contains letters, digits, _ and $; cannot start with a digit)Match hello, _hello_, HelloWorld2014
- Skip 7hello, hello world, hello!
- A floating point number with a decimal pointMatch 1.0, 1.5, -2.1, +3.14
- Skip 1, -2
- A hexadecimal number (starts with # or 0x and contains 3 or 6 hex digits)Match #FFF, 0xABCDEF, #123456
- Skip 0x, 0x12, #1234
- A username (contains letters and digits) from an email that ends with peacocks.uiu.edu. Capture username as a groupMatch doej123 in d..[email protected]
- Skip d..[email protected]
- An email from a domain .edu. A username may contain a period
- Match doej123 in d..[email protected], d..[email protected], d..[email protected]
- Skip h..[email protected], h..[email protected]
Please check the attachment for the solution. I have also taken screenshots to show... View the full answer
This question was asked on Jun 16, 2017 and answered on Jun 18, 2017 for the course CS 212 at Upper Iowa.
Recently Asked Questions
- 1 . Decide if each statement is True or False. If False, provide a counterexample (stating domain D and the functions f and | f | involved; no
- Question 1 A manage receives bonus that is calculated as a percentage of annual profit generated by his company. With reference to the Positive Accounting
- I need full solution with items that are boxed in yellow. Thank you.