I suggest, you don't bother with any regex at all. 
The title of the page can easily be constructed "from scratch" each time. The same can be done with the pathname. No replace.