Late response to an old post, but it may help other folks looking for something like this.
Similar to David's suggestion the following allows you limit the output to just the previous line.
^(.*)\n(.*)last message repeated