 At Wimbledon , Federer survived an epic five @-@ set thriller in the third round against Julien <unk> on his way to the semifinals . In his semifinal match @-@ up against world No. 1 Novak Djokovic , Federer earned a record eighth Wimbledon final appearance after dispatching Djokovic in four sets . Federer defeated Andy Murray in four sets in the 2012 Wimbledon final , regaining the world No. 1 ranking in the process . " It 's amazing . It equals me with Pete Sampras , who 's my hero . It just feels amazing " , Federer said of winning his seventh Wimbledon championship , tying Sampras ' Open Era record . By defeating top @-@ ranked Djokovic in the semifinals and winning in the finals , Federer returned to the top spot in the world rankings and , in doing so , broke Sampras ' record of 286 weeks atop the list . 
