In Spanish, the term for ‘ex boyfriend’ is ‘exnovio’. The prefix ‘ex’ is used in many languages, including Spanish, to indicate a former relationship. The word ‘novio’ translates to ‘boyfriend’ in English, so when you combine them, it directly translates to ‘ex boyfriend.’
It’s worth noting that in informal contexts, people may also use ‘ex’ alone to refer to someone’s former boyfriends, similar to how we do in English. For example, you might hear someone say, ‘Mi ex está en la ciudad,’ which means ‘My ex is in town.’