Here is a changed version, that says "Match some characters ; immediately preceding the end is not "login"
, and immediately following is ".com"
.
The problem in your part was: you had two lookaheads, looking ahead from the same position. It read: "some string, that is followed by something that at the same time is not "login"
and is ".com"
. Indeed, ".com"
is not "login"
, so that's what you matched.