Regular Expressions: Replace the Last Occurrence of a Pattern in Ruby | Hacker News Reader