I would like to use regular expressions to extract the first couple of words and the second to last letter of a string.
For example, in the string
"CSC 101 Intro to Computing A R"
I would like to capture
"CSC 101 A"
Maybe something similar to this
grep -o -P '\w{3}\s\d{3}*thenIdon'tKnow*\s\w\s'
Any help would be greatly appreciated.