Challenge: Regular Expressions

Check your understanding of regular expressions.

Problem statement

Write code that prompts the user to enter a regular expression, then prompts the user to enter some input for the regular expression, and compares the two for a match until the user presses the "Esc" button.

Expected input

The input to the running console app should look something like this:

Get hands-on with 1400+ tech skills courses.