"Tim Werner" <[EMAIL PROTECTED]> writes:
> I want to open the log file with emacs, and do a
> "search-forward-regexp" to look for lines that do NOT end with "same
> date". It turns out that I am too stoopid to figure out how to
> construct the correct regexp.
IMHO it is better to use another Emacs feature to do what you need.
For example, you could delete all lines that end with "same date",
using the flush-lines command. Then all remaining lines are the ones
you're looking for. Or, you write a function that looks if the
current line ends with "same date". If not, then stop, else go one
line forward and repeat.
If it MUST be a regexp, then the idea behind it is this: a line that
does not end with "same date" is a line that does not end with "e", or
a line that ends with "e" but the character before that is not "t", or
a line that ends with "te" but the character before that is not "a",
and so on.
Here is a beginning to express this kind of logic:
[^e]$\\|[^t]e$\\|[^a]te$\\|...
You may have to add some rules for lines that are too short. The
above logic would not find the line "ame date", for example, because
it expects a character before the "ame date". Of course,
^$\\|^.$\\|^..$
will match lines of up to two characters, but no longer lines.
Kai