We consider the following random model for edge-colored graphs. A graph G on n vertices is fixed, and a random subgraph Gp is chosen by letting each edge of G remain independently with probability p. Then, each edge of Gp is colored uniformly at random from the set [n−1]. A result of Frieze and McKay (Random Structures and Algorithms, 1994) implies that if ε>0, G=Kn, and p=(2+ε)lognn, then Gp almost surely contains a rainbow spanning tree. In this paper, we show that if ε>0 and G is a d-regular Ω(n)-edge-connected graph, then when p=(2+ε)lognd, Gp almost surely contains a rainbow spanning tree. Our main tool is a new edge-replacement method for rainbow forests.