Question: Here are five practice problems designed to help you get hands - on experience writing regular expressions in a Ruby program. In these problems, complete

Here are five practice problems designed to help you get hands-on experience writing regular expressions in a Ruby program. In these problems, complete the given code by inserting the appropriate regular expression to fulfill the task described in each problem.
1. Extracting Hashtags from a Tweet
Replace nil with the regular expression to extract all hashtags.
2. Validating a Password
Replace nil with the regex for a password that must contain at least one uppercase letter, one lowercase letter, one digit, and be 8 to 16 characters long.
3. Finding Numeric Values in a String
Replace nil with the regex to find all numeric values in a string.
4. Matching a Date Format
Replace nil with the regex that matches dates in the format YYYY-MM-DD.
5. Parsing a Log Entry
Replace nil with the regex to match log entries beginning with a severity level (INFO, WARN, or ERROR), followed by a message.

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 Programming Questions!