Well, I don't know how to do it using regex. But I have an easier way to convert pdf to epub. I use Nitro PDF.
here we go:
1. Crop PDF Document using Nitro PDF to eliminate page numbers and repeated titles, save the cropped PDF and use this for the next step. Remember, even though the page number and repeated titles in the cropped PDF is gone, but the are still there safely hidden. To permanently remove them, go to step 2.
2. Convert the cropped PDF to word (.doc). Now they are finally gone. But you have to go to step 3.
3. Convert the .doc document back to PDF(you may use cutePDF, PrimoPDF, etc). Now you have a new PDF with pages number and repeated title completely gone.
4. And finally convert the new PDF to ePub. and voala.. the page numbers are gone, the reapeated titles are gone..
It worked like charm to me, you may try this.