Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design an FSA that will recognize date expressions that come in two forms: 1 9 / 1 / 2 0 2 1 ( the day

Design an FSA that will recognize date expressions that come in two forms: 19/1/2021(the day is first) or 19 Jan 2021. Assume that date strings are fed to your FSA one character at a time. In general, assume the patterns are either DD/MM/YYYY or "DD MMM YYYY", where MM = a one- or two-digit month string, between 1 and 12 inclusive; DD = a one- or two-digit day string, between 1 and 31 inclusive; and YYYY = a one-to-four-digit year string, between 0 and 9999 inclusive; and MMM = a three character month string, starting with a capital letter, one of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec. In the first pattern, there will be no whitespace; in the second pattern, assume that the day/month and month/year strings are separated by a single space.
Write your solution to above given problem as a regular expression. You may split the regular expression in parts if you so wish.

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago