Does ex have a full form?
Google dictionary has this information about the origin of ex:
But what is the origin of the usage as a prefix in the words like ex-wife, ex-boyfriend?
The prefix ex- is of Latin origin but the words ex-wife, ex-boyfriend are an extended use of Latin phrases such as ex consule, ex magistro equitum, (one who) from being consul, master of knights (where ex- is prefixed to titles of office or dignity). Later such phrases were being replaced by exconsul, exmagister. They are formed in the same manner as the compounds proconsul, propraetor which had been developed from the older pro consule, pro praetore.
OED explains further how the adapted forms passed into other languages and when it have become common in English:
In medieval Latin this usage was greatly extended, such forms as ex-Augustus (‘ex-emperor’) being of frequent occurrence. Some words of this formation (e.g. ex-professor) passed in adapted forms into Italian and French, and on the analogy of these ex- was prefixed to Romanic words. The English use, imitated from French, seems to have first become common towards the end of the 18th cent.
OED's earliest citation is from 1398:
Ex~consul is he that leuyth the offyce of Consul.
J. Trevisa tr. Bartholomew de Glanville De Proprietatibus Rerum (1495) xiv. xlviii. 484
Note: De Proprietatibus Rerum (On the Order of Things) is an encyclopedia dating from the 13th century. Although it is often described as a bestiary, its focus encompasses theology and astrology as well as the natural sciences (as understood in 1240). [Source: http://spcoll.library.uvic.ca/]
ex- is defined as:
a prefix meaning “out of,” “from,” and hence “utterly,” “thoroughly,” and sometimes meaning “not” or “without” or indicating a former title, status, etc.
Origin of ex-
ex- is a word-forming element, which in English simply means "former" in this case, or mainly "out of, from," but also "upwards, completely, deprive of, without. It most likely originated in Latin, where ex meant "out of, from within," and perhaps, in some cases also from Greek cognate ex, ek.
Defining "ex," with or without the hyphen, solely as a reference to "past" or "former," ignores its use in an entirely different direction and intent. "Ex" is used (without a hyphen) in commonly used Latin phrases, and almost never suggests "former" or "past." In such uses, "ex" denotes present tense. For example:
Another Latin phrase is "ex officio," which one frequently finds written with the hyphen inserted erroneously. This Latin phrase means from the office, in reference to someone who presently has a right or privilege because of an office currently held. It is regularly used correctly today in business, academics, and law for serious purposes.
Written as "ex-officio," though, it conveys, roughly, the opposite (only roughly because it is not proper Latin). It is used in this way where it should not, such as in news stories, magazines, and books. Some dictionaries actually define it as "former official," with no reference to its real meaning. Allowing this isn't word creep or poisoning a dry well. It is tantamount to poisoning a well filled with fresh water.