In sed, how do I remove everything behind each @
in a string, as long as that does not contain a /
?
i.e.
user@host becomes host
user:password@host becomes host
user:passw@rd@host becomes host
host:/foo@bar becomes foo@bar
user:password@host:/foo@bar becomes foo@bar