title: How do I use sed to substitute the third occurrence of the same regex in the file?
body: <p>I have a problem finding a <code>sed</code> script that works when the regex looks exactly the same but I only want to substitute one. </p>
  
  <p>The file looks like this:</p>
  
  <pre><code>something someting something
  this 
  something someting something
  something someting something
  this 
  someting something
  someting something
  someting something
  this
  someting something
  someting something
  this
  </code></pre>
  
  <p>I want to substitute the third "this" to something else. I have tried with:</p>
  
  <pre><code>sed '3,/this.*/s/this.*/something/'
  </code></pre>
  
  <p>and various similar attempts, but it doesn't work. </p>