What does the prefix ex- mean?
Ex- has two uses. The first is to talk about someone or something that was one thing before and no longer is: a person who had a position, a relationship or a job. When it is attached to a position or a relationship, English writes it with a hyphen, as in ex-president or ex-wife.
Ex- also means "outward"
The second use comes from the Latin ex, "out of", and shows movement toward the outside: taking out, going out, leaving out, expanding. These words are not written with a hyphen, and many no longer feel like words with a prefix, because we learn them whole. To know which use it is, look at the hyphen and at the context.