From the Super Mario Wiki
Rexes are purple and orange dinosaurs who inhabit Dinosaur Land and other places. They are dinosaur-like dragons because they have wings which they have yet to be seen to be able to fly with. They are notable for their horn and fang, and they also wear big red shoes, similar to Yoshi. A recurring trait with all Rexes are their compressive bodies, as their stature becomes flatter when jumped upon. They first appeared in Super Mario World.
Super Mario series
Super Mario World
Rexes are rare enemies in Super Mario World who, just as Goombas, put no effort into attacking Mario other than walking into his direction. In order to defeat a Rex, Mario would need to jump on it twice. After being jumped on once, a Rex will simply become flattened and move slightly quicker. A Spin Jump would destroy them with one hit. A Rex could also be defeated by shooting a fireball, hitting it with a cape or running into it while using a Starman. Rexes can also be eaten by Yoshi.
Super Mario World television series
Rexes, though simply referred to by the generic term Dinosaurs, make several appearances in the Super Mario World animated series. The Rexes of Super Mario World come in different colors, such as green, red and yellow.
"Send in the Clown"
Rexes first appeared in the episode "Send in the Clown", where several are shown disguised as clowns in King Koopa's "Koopaling Bros. Circus". After several misadventures in their circus act, that the clowns are accidentally revealed to be Rexes, who, upon tearing off their costumes, begin to herd all the circus audience members into a large pit.
"King Scoopa Koopa"
In "King Scoopa Koopa", several multi-colored Rexes are shown to be working as employees at King Koopa's fast-food stand. After it is revealed that King Koopa had planned on mutating the inhabitants of Dome City into Chickadactyls, which he plans on deep-frieing and selling to Rexes, King Koopa sends several Rexes to capture Mario and Princess Toadstool. Mario and Princess Toadstool escape using the Star Path, only to return later to defeat the Rexes using a cape. The Rexes that were not defeated by Cape Mario later escaped down a Warp Tube, along with King Koopa.
"Born to Ride"
In the episode "Born to Ride", two Rex bikers named Duke and Rockman appear. Duke and Rockman, along with their ally, Lulu, attempted to manipulate Yoshi into capturing Mario and Luigi for them, only to be beaten in the end.
In a later episode entitled "Rock TV", two other Rex characters named the Tyrannosaurus Twins appear. The Tyrannosaurus Twins, who were wrestlers, after pummeling Mario and Luigi for sometime, are eventually defeated by Cape Mario.
Nintendo Adventure Books
A Rex has appeared in volume 3 of Super Mario-Kun. He captures the Mario Bros., thinking they're working for Bowser. A stung Yoshi then convinces him that the Mario Bros. are allies. The four then go into Rex's house, as Rex promises to give them food as a apology. However, Kamek and a Koopa then use the kamemeka to brainwash Rex. Rex then makes an inedible material, which Yoshi quickly digests. After some groaning, Yoshi claims it was "delicious". Furious that he did not succeed, Rex then uses a flamethrower to burn Mario and Yoshi, while Luigi dodges in time. Kamek then uses his power to make Rex grow. After the kamamaka falls off, Rex and the others put the kamemeka on Kamek instead, thus ending the chapter.
Super Mario Adventures
Rexes also appear in the Super Mario Adventures comic, where several of them are seen among the attendees at Bowser's wedding to a brainwashed Princess Toadstool. Later on, after Mario, Luigi, Yoshi and a herd of Yoshis crashed Bowser's wedding, a lone Rex is seen among the creatures trying to defeat the Yoshis, only to be trampled by them.
Super Mario Bros. film
Mario & Luigi series
Mario & Luigi: Superstar Saga
Rexes reappeared in Mario & Luigi: Superstar Saga as enemies located on Hoohoo Mountain. Like in Super Mario World, Rexes will attack Mario or Luigi by charging into them; Rexes could also be decreased in size by repeatedly jumping on them in this game as well. When they are at their full size, the Rexes' attacks cannot be dodged or countered.
Mario & Luigi: Partners in Time
Though regular Rexes do not appear in Mario & Luigi: Partners in Time, a Shroob-variant of them, called Shroob Rex do appear. Shroob Rexes are encountered in Shroob Castle and have a different appearance, having pincers, purple scales and glowing red eyes.
Super Princess Peach
Normal Rexes appeared in Super Princess Peach as well. Rexes who have been affected by the Sad Vibe also appeared. They are known as Sad Rexes. Sad Rexes will simply sit and weep to themselves, until they are approached by Princess Peach. They will then proceed to charge at her.
In the Nintendo Monopoly, Rexes only make a very small cameo. They appear on the background of the board, in a screenshot, where Mario is riding a Green Yoshi that is spitting out fire at the Rex. They appear in Mario's FUNdamentals as a playing card when the player plays Go Fish with Mario.
Names in other languages