Rex and Ahsoka are very close friends, having met each other at the battle of Christophsis after she was assigned as Anakin's apprentice. He took an immediate liking towards her and later congratulated her when she helped Anakin destroy the Separatists' shield generator.
When Ahsoka was accused of being the Mastermind behind the bombing of the Jedi Temple and killing several Clone Troopers, Rex was the only clone who doubted she could ever pull unspeakable. However he (reluctantly) had to brand Ahsoka as a dangerous criminal and order for her capture.
After Ahsoka's and Rex's reunion on Mandalore, Rex faught by Ahsoka's side and helped her fight against the Clone Troopers during Order 66.
Rexsoka is one of Ashley Eickstein's favorite aspects of Star Wars.