title: Using sed to replace last occurrence
body: <p>I got <a href="https://stackoverflow.com/questions/6271348/regex-to-replace-last-occurrence-of-a-string-in-each-line">this</a> question and other questions over the internet, but not able to solve the following scenario:</p>
  
  <p><strong>The input string is :</strong> <code>SF_db_gobfid01_20141209/SF_db_gobfid01_bat_20141209.lst</code></p>
  
  <p><strong>The output will be:</strong> <code>SF_db_gobfid01_20141209/SF_db_gobfid01_bat_20150122.lst</code></p>
  
  <p>but the following are not working: </p>
  
  <pre><code>echo "SF_db_gobfid01_20141209/SF_db_gobfid01_bat_20141209.lst" | sed 's/20141209$/20150122/'
  </code></pre>
  
  <p>Is there any solution for this?</p>