When used in all capital letters, and usually in the context of video games, "EX" can refer to a difficulty level, or something like "extra", meaning post-content stuff in a video game that is extremely difficult. For example, "Bloodbath EX" in Monster Hunter Generations Ultimate, or Boss EX 1 and 2 in Star Revenge 8 (A SM64 hack. Watch Patty's video on it.) It is typically a term used in Japanese games, but can also apply to non-Japanese games as well.
A person who you dated at one point in time before said person (or you) decided to break up. Some people refer to this person as an ex-girlfriend or an ex-boyfriend or even ex-SO. They just depend on the person's gender.