Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Regex in Practice For this question you will perform string matching on a large text file. Download the following text file containing the entire

4. Regex in Practice

For this question you will perform string matching on a large text file. Download the following text file containing the entire collected works of Shakespeare:

http://www.gutenberg.org/files/100/100-0.txt

Use the Unix/Bash command-line utilities like grep, awk, uniq and sort. If you dont have access to a Bash command-line, you can either install an emulated version in Windows, or try one of the these many pre-configured Linux virtual machine images.

Tip: To download the file directly from the command line try: wget http://www.gutenberg.org/files/100/100-0.txt

For each question, give the answer in a .txt file along with the list of command(s) used. Results should be unique and case-insensitive. For example if you were given a list containing the words: this and THIS and This, and were asked to find all the words the began with th and ended in s, the result should contain one word: This.

Find:

(a) All words that start with a th and end in a vowel

(b) All words that are 14 characters long

(c) All questions asked by Cleopatra

(d) The number of words containing two zs

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

Long-Term Liabilities" Please respond to the following:...

Answered: 1 week ago