regular expressions negation
Hi All,
I am wondering If is possible to write more complcated regexp such this: lets say I have file Code:
"datum">Sobota 24. októbra 2009 Code:
grep -oE '"[^"]*"' And now, what if I want everything that is not in the quotes? (>Sobota 24. októbra 2009) I tried negation of previous regexp Code:
grep -oE '[^("[^"]*")]*' grep: Unmatched ) or \) Is possible to write negation of regular expression? Thank you for reply |
Use the -v flag to inverse grep's results. But, maybe you want to use sed to delete matched text?
|
Hi,
yes I knew -v option (also with -o is interesting) but was interested if it is possible doing more comlicated regexp, but probably -v is the best solution. Thank you |
All times are GMT -5. The time now is 07:04 AM. |