I'm trying to replace a string upto the first instance of a second string with sed (in OS X). My sed command unfortunately replaces everything up to the last instance of the second string.
my text:
<li>lorem ipsum</li><li>dolor sit amet</li><li>something</li><li></li>
I need to remove <li>lorem ipsum</li>
so that the new line looks like this:
<li>dolor sit amet</li><li>something</li><li></li>
my sed command unfortunately replaces the whole line:
sed -i "" 's:<li>lorem.*</li>::'
Do you have an idea how to solve this with sed?
Thanks AleV