I'm trying to use iTerm2 profile triggers on my mac to change the prompt if I leave my home directory.  This rule should only apply when the node I'm on has a hostname of headnode.  The prompt will also include the machine's location in parenthesis after the hostname.  I'm trying to build a regex that will match any directory unless it includes ~. 
So it should match:
[jbutryn@headnode (us-west-a) /]$
but not:
[jbutryn@headnode (us-west-a) ~]$
or
[jbutryn@headnode (us-west-a) ~/tmp]$
etc.
Currently I'm building my regex like this:
\[.*\@headnode.*(?!\~).*].
But that matches all examples above. Does anyone know what I'm doing wrong? Thanks!



PS1.