Here are three prefixes that always use a hyphen when forming words: ex, all, self
Use a hyphen after the prefix -ex when ex– means “former.”
ex-girlfriend
ex-husband
ex-president
ex-governor
ex-sister-in-law
Use a hyphen after the prefix all- when all- is modifying a noun or adjective:
all-powerful
all-encompassing
all-inclusive
all-time
all-star
Use a hyphen after the prefix self- when self- is modifying a noun or an adjective:
self-aware
self-control
self-esteem
self-centered
self-absorbed
When ex-, all-, and self- are an integral part of the word, do not use a hyphen:
extra
exclusive
allow
alligator
selfish
selfless
The prefixes ex-, self-, all- use a hyphen when forming a compound word.