Rex was a character in the Dixon Hill series of holographic novels. He was handsome and a charmer. He owned a 1940s bar named Rex's Bar. He amusingly replied to Dixon Hill when asked for his last name, "Hmm, don't think I have one. Just Rex, that's all."
In 2365, Ambassador Lwaxana Troi of Betazed visited the USS Enterprise-D. Captain Jean-Luc Picard, in order to escape Mrs. Troi's amorous advances, decided to seek refuge from her in Rex's Bar. Lwaxana followed him into the holodeck and lost interest in Picard after meeting Rex. To her regret, she later found out that her dream man was only an illusion. (TNG: "Manhunt")