This is the 790th most frequent Portuguese word.
ex
Former; previous.
Here, 'ex' is used as a prefix that denotes former, referring to a past status or relationship.
Meu ex-namorado ainda mantém contato com meus amigos.
My ex-boyfriend still keeps in touch with my friends.
In this case, 'ex' is again functioning as a prefix implying 'former' regarding a previous profession.
Ele deixou de ser engenheiro para se tornar professor, então agora ele é ex-engenheiro.
He stopped being an engineer to become a teacher, so now he is a former engineer.
The prefix 'ex' is used to denote that the employees were formerly part of the company.