regex - grep for words ending in 'ing' immediately after a comma -


i trying grep files lines word ending in 'ing' after comma, of form:

... gave dog bone, showing great generosity ... ... man, having no home ... 

but not:

... great place, having time ... 

i find instances 'ing' word the first word after comma. seems should doable in grep, haven't figured out how, or found similar example.

i have tried

grep -e ", .*ing" 

which matches multiple words after comma. commands like

grep -i -e ", [a-z]{1,}ing" grep -i -e ", [a-z][a-z]+ing" 

don't expect--they don't match phrases first 2 examples. (or pointers better tool) appreciated.

try ,\s*\s+ing

matches first 2 phrases, doesn't match in third phrase.

\s means 'any whitespace', * means 0 or more of that, \s means 'any non-whitespace' (capitalizing letter conventional inverting character set in regexes - works \b \s \w \d), + means 'one or more' , match ing.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -