exclude atom from being matched (multiple letters)
Thierry Blanc <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
Can sed negate matching an atom, i.e. multiple letters? Example: match any line starting with foo, but NOT ending with a dot followd by zero or more spaces (end of line marked with $) foo rhabarber etc .$ foo rhabarber etc . $ foo rhabarber etc$ foo rhabarber etc $ only match third and forth line. atom is: (\. *) negate atom??? sed '/foo.*^(\. *)$/ # does not work, of course, matches beginning of line