What your pattern will do is:
^ - match the start of the line/string
(TRUST) - match the characters "TRUST" immediately at the start of the line and capture the text (#1)
(?:(?!DEPT).)* - check to see if the next characters are "DEPT" - if not (this is a negative lookahead) then step forward 1 character and repeat - if so then stop
(#1 - there is little need to capture the text in this case. The captured text can only be "trust" [perhaps ignoring upper or lower case] and so you know beforehand that if the pattern as a whole matches, then the first characters must be "trust" without capturing them. In your original question, the initial characters could be any digit; therefore there may have been value in capturing them so they could be used later on)
In effect this makes sure that the work "trust" is at the start of the line and then matches everything until either the work "dept" is found or the end of the line is reached.
Therefore you will need to add a check that what stops the 2nd part of the pattern is the end of the line and not the word "dept". Therefore you will need to do something like:
^(TRUST)(?:(?!DEPT).)*\r?$
(my previous comment about the use of '\r?' applies here as well). What this does is to say, of the 2 conditions that cause the '(?:(?!DEPT).)*' part to stop matching, the '$' anchor makes sure that it is the end of the line. If the word "dept" had caused the sub-pattern to stop repeating, then the '$' would not match the "D" and the pattern as a whole would fail.
One thing you need to be aware of (and I overlooked this in my previous response as well) is that the '^TRUST' part will also match if the text begins "trusting" or any other word that begins with "trust". Similarly, the 'DEPT' will match any character sequence that happens to have those 4 characters in sequence within it - in this case "dept" does not generally occur within English words (at least according to the web site I checked) but when you start using this approach in other circumstances, then this can be an important issue.
The way around it is to use the '\b' anchor to ensure the beginning/end of a word is taken into account. For example, your pattern could become:
^TRUST\b(?:(?!\bDEPT\b).)*\r?$
There is no need for a '\b' before "trust" because you already have the '^' there which means that the '\b' in '^\bT' must always match and so is redundant.
Susan