sed replace everything after pattern code example
Example: sed replace all until match in line
echo remove_staystay... | sed 's/.*\(stay.*\)/\1/g'
stay #remove all but from last ocurrence match until end
echo remove_staystay... | sed 's/.*\(stay.*\)/\1/g'
stay #remove all but from last ocurrence match until end