Reformat Date, Remove line break, prepend and append but only after a date is matched?

The best thing to do is paste directly from the clipboard from Books.app into the forum using the forum Code Block. This should preserve all characters, except maybe CR.
CRs might be converted to LF when you paste into the forum.

I would suggest using BBEdit, but it also converts CRs to LFs.
Is it possible to export the text from Books.app to a text file? If so, do that and then zip the text file and upload to the forum.