Find: <p[^>]*><span[^>]*>((Chapt|CHAPT)[^</]*)</span></p> Replace: <hr class="sigilChapterBreak" /><h2>\1</h2>