For learning regular expressions start with what you want to replace and start replacing parts of it with regular expression characters. Meaning you have:
Code:
<div><h4>Book Author</h4><h6>Page 1 of 365</h6></div>
Start by replacing parts that change:
Code:
<div><h4>Book Author</h4><h6>Page \d{1,3} of 365</h6></div>
Then:
Code:
<div>\s*<h4>\s*Book\s*Author\s*</h4>\s*<h6>\s*Page\s*\d{1,3}\s*of\s*365</h6>\s*</div>
And so forth.
Also, the trickiest part of regular expressions is the confusion when it matches things you didn't expect it to match. calibre has a regular expression wizard in the search and replace option section that will show you all matches for your regex in the document. Use this or if you have a text editor that can highlight all matches use it. It will save you a lot of time and trouble.