sed replace all until match in line

C++
echo remove_staystay... | sed 's/.*\(stay.*\)/\1/g'
stay	#remove all but from last ocurrence match until end
Source

Also in C++: