Finding a solution for this was bordering on ridiculous, no matter how I put it… “replace using non greedy”, “replace only one instance of a string”, “replace first string match only” I struggled to find an answer. The man page had no information on this either.
After a while I came up with the following solution.
sed ‘0,/this/s//to_that/’ filename.txt
After tweeting for some help on how this actually works, a colleague sent me the following link