Question: In this part, you will write regular expressions for 4 problems and create test cases for them (5 matching, 5 non-matching as previously). You will

In this part, you will write regular expressions for 4 problems and create test cases for them (5 matching, 5 non-matching as previously). You will also practice interpreting a written specification into program requirements - remember, edge cases matter! An example of this is also shown further down.

  1. Integer List: A list of comma-separated, positive integers surrounded by square brackets []. A optional single space character is allowed after the comma.
    • The number of integers is not specified, so an empty list ([]) is allowed.
    • The term comma-separated implies that a trailing comma ([1, 2, 3,]) is not allowed.
    • The single space character does not need to be consistent, so mixed spaces ([1,2, 3]) is allowed (this makes it a bit easier to implement).
    • Examples: [1], [1,2,3]
    • Non-Examples: 1,2,3, [1 2 3]

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!