I'm new to typesetting and I'm trying to find the best ways to format text for a template I use all the time. My question is this:
How do I format the GREP code in the find/replace tool to be able to format text that can only be identified by the text that proceeds it?
For example:
--------------------------
CHAPTER XIX
HOW THE VINEYARD OF THE PARISH PRIEST OF RIETI, IN WHOSE HOUSE ST. FRANCIS PRAYED, WAS STRIPPED OF ITS GRAPES BY REASON OF THE MULTITUDE OF PEOPLE THAT CAME TO SEE HIM; AND HOW THAT VINEYARD BROUGHT FORTH MIRACULOUSLY MORE WINE THAN EVER BEFORE, ACCORDING TO THE PROMISE OF ST. FRANCIS. AND HOW GOD REVEALED TO ST. FRANCIS THAT PARADISE SHOULD BE HIS PORTION WHEN HE DEPARTED THIS LIFE
ST. FRANCIS being on a time sorely afflicted in his eyes, was invited by a letter from Cardinal Hugolin, protector of the Order, to come to Rieti, where excellent physicians for the eyes then dwelt, for he loved him tenderly. When St. Francis received the cardinal’s letter he went first to St. Damian’s, where St. Clare, the most devout spouse of Christ was, to give her some consolation; then he would go his way to the cardinal at Rieti. And the night after he came thither his eyes worsened so that he saw no light at all.
--------------------------
Obviously, I can easily do a find/replace search for the "Chapter" part and replace with the correct formatting.
However, the second part (subtitle) and third part (paragraph) cannot be search for directly b/c each one is completely different. However, I do think that there must be a way to write the GREP code so that it finds "Chapter", skips over it and changes the formatting to the following paragraph (subtitle) without affecting the formatting on the first line.