We consider the following random model for edge-colored graphs. A graph G on n vertices is fixed, and a random subgraph G(p) is chosen by letting each edge of G remain independently with probability p. Then, each edge of G(p) is colored uniformly at random from the set [n-1]. A result of Frieze and McKay (Random Structures and Algorithms, 1994) implies that when G=K-n and p = (2 + & varepsilon;) logn/n for some constant & varepsilon; > 0, then G(p) almost surely contains a rainbow spanning tree. In this paper, we show that if G is a d-regular Omega(n)-edge-connected graph, then when p= (2 + & varepsilon; ) logn/d for some constant & varepsilon; > 0, G(p) almost surely contains a rainbow spanning tree. Our main tool is a new edge-replacement method for rainbow forests. (c) 2024 The Author(s). Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons .org/licenses /by/4 .0/).