Question: Regex Pattern Recognition on a specific pattern. There's a text file which I need to find one single regex pattern that would be able to

Regex Pattern Recognition on a specific pattern. There's a text file which I need to find one single regex pattern that would be able to find both of these formats within the text file. This will be used with the grep command on a UNIX terminal.

(Fall or Summer) space 2017 space (Any 3-4 characters) space (three numbers with an optional letter at the end)(a dash)(2 numbers)(space)(5 numbers)(1 to infinite spaces)(9 numbers)

for example: this should be able to be located but not limited to this, this is just an example.

Fall 2017 COMM 438T-01 21785 888972491

here's another example:

Summer 2017 MSW 571-40 11230 890248716

Both should work in the given pattern.

I need a single working grep command. grep -E (PATTERN)

(please assume none of the material is in the beginning and end of the line)

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!