Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

RegEx Please paste your commands after each question You are to define a pattern for each requirement 1. Build a pattern for the word license,

RegEx

Please paste your commands after each question

You are to define a pattern for each requirement

1. Build a pattern for the word license, even if it is misspelled by mixing up the c and the s

2. Define a pattern to find the number 21 followed by a single lower- or uppercase letter

3. Define a pattern to find two uppercase letters in a row, followed by a single digit, followed by one lowercase letter

4. Build a pattern to find a number from 3 to 7:

5. An uppercase X, followed by any two digits

6. Letter X not followed by a or o:

7. At least one non-alphabetic character

8. Letter H followed by any letter from a to z

9. A single upper- or lowercase followed by a single digit, followed by a lowercase letter

10. Build a pattern to a Canadian postal code. These codes have the format letter number letter space number letter number, where all the letters are uppercase, for example, M5P 3G4

11. Define a pattern to find Uppercase letter H followed by zero or more lowercase letters

12. Define a pattern to error followed by zero or more characters, followed by code

13. Build a pattern to find a colon, followed by zero or more occurrences of any other characters, followed by another colon

14. Build a pattern to find the letters variable followed by one or more numbers

15. Build a pattern to match either an uppercase V or lowercase v at the beginning of the above pattern

16. Word color (American spelling) or colour (British spelling)

17. Match exactly 3 digits

18. Match at least 3 digits

19. Match 5 or fewer digits

20. Match 3 to 5 digits

21. Match any of the following words: cat, dog, bird, hamster

22. Match any of the following complete words: cat, dog, bird, hamster

23. Consider the lines below:

But remember to use these 3 digits: 76 2

There could be an error in 32variable3x

You can concatenate as well

Remember that errorcode 541 means Too many parentheses

Thats your licence to kill harlly

I know you like Harmonica, even your dog

Well now set Variable417

Build a pattern to find either 2- or 3-digit numbers

24. Write a regular expression that matches against hyphenated Social Security numbers.

25. Write a regular expression that matches URIs. Look at the IETF document RFC 3986 for the URIs generic syntax. You cannot use the regex it defines. Please illustrate your regex with some examples

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions