The problem is that at the point where you've put the negative lookahead, the next character is also constrained to be a colon: the negative lookahead succeeds trivially as h
is not the next character!
What you probably actually want is to put the negative lookahead after the colon so that the next character is not a /
:
(.*):(?!/)
But at that point you might as well use a positive lookahead and stop using a capturing group at all. You should also not allow colons to be captured or the RE would be able to consume much more than you might expect:
result = regex.search('[^:]*(?=:[^/])', some_string)
result.group()