The following explanation is from DR. Ray's Long List of Editorial Pet Peeves:
The abbreviation “e.g.” is from the Latin meaning exempli gratia, or “for example.” This abbreviation should only be used in a parenthetical comment. There should be a period after both “e” and “g” since it is an abbreviation of two Latin words.
EX: Brittle materials (e.g., glass) fracture without experiencing strain hardening
EX is short for the word example. I've also seen it written Ex and ex. Use it, as the author above has, to mark a specific example.
All the best.