I'm trying to perform a substitution of the everything up to and including the first occurrence of a string but am failing.
Say I have the following string:
one two three four five four three two one
I want to get
three four five four three two one
but with
sed 's/.*three//'
I end up with
two one
I've tried other variations with .*
-> (.*$)
and (.*?)
to no avail.
I've seen how to replace the first occurrence http://techteam.wordpress.com/2010/09/14/how-to-replace-the-first-occurrence-only-of-a-string-match-in-a-file-using-sed/ but not everything up to that first occurrence.