How to exclude a sequence of characters

"Thomas Wiedmann" <[email protected]> Sat, 12 Mar 2011 18:47:00 +0100
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <[email protected]>
Hello,

I'm looking for an appropriate regular expression to search a certain 
pattern, but to exclude a special sequence of characters.
Example: Trying to get all matches of the pattern 'test' but excluding all 
matches of the pattern '-end', i. e. if the text contains 'test-end' this 
text location should not be matched.

By which regular expression can this search condition be realized?

Thomas Wiedmann