get until last match code example
Example: get until last match
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