[SOLVED] Word That Begin With q and end with k
by blueray from LinuxQuestions.org on (#51Q02)
I have a sentence: the question, did the quick brown foxxxxxx quack wearing nik
Here, I want to extract words starting with q and ending with k using preferably grep.
What I got so far is:
Code:grep -P "\bq.*?k\b" regex.txtIt yields 2 matches: question, did the quick and quack
How can I yield quick and quack from the sentence using regex?


Here, I want to extract words starting with q and ending with k using preferably grep.
What I got so far is:
Code:grep -P "\bq.*?k\b" regex.txtIt yields 2 matches: question, did the quick and quack
How can I yield quick and quack from the sentence using regex?