You could use something as:
{% "name@company.com".Substring(0, "name@company.com".LastIndexOf(".")) #%}
This will find the last . in your string.
This lastindex of makes sure it also works for something like first.lastname@company.com
This will however not work for domains in for instance the UK... email@company.co.uk