|
|
|
|
|
by asicsp
3022 days ago
|
|
sorry, it is not same as `grep -iv '^c'` the `-o` option allows to output only matching portion, the regex is meant to extract all words other than those starting with 'c' or 'C' here's hopefully better example $ # do something with words not surround by quotes
$ echo 'I like "mango" and "guava"' | perl -pe 's/"[^"]+"(*SKIP)(*F)|\w+/\U$&/g'
I LIKE "mango" AND "guava"
|
|