import re with open("tmp_home_current_block3.html", "r", encoding="utf-8") as f: content = f.read() # Isolate and remove the old HTML section html_pattern = re.compile(r'.*?', re.DOTALL) # Remove old inline CSS block css_pattern = re.compile(r'/\* KMC THIRD SECTION START \*/.*?/\* KMC THIRD SECTION END \*/', re.DOTALL) # Remove patches patch1 = re.compile(r'\s*', re.DOTALL) patch2 = re.compile(r'\s*', re.DOTALL) patch3 = re.compile(r'\s*', re.DOTALL) patch4 = re.compile(r'\s*', re.DOTALL) patch5 = re.compile(r'\s*', re.DOTALL) new_block = """

Specialty

  • VC & PE Partnership

    I coach portfolio founders and CEOs to drive exponential valuation growth by transforming “impossible” ambitions into measurable professional outcomes.

  • Leadership Alignment

    Following CEO transformation, I align senior leadership teams to ensure the entire organization moves with singular, high-velocity purpose toward a transformed future.

Credentials

  • Certified

    ICF PCC Certified Executive and Life Coach

  • Trained

    Trained in Adaptive Leadership Styles and Personal and Professional Transformations

Confidential Insightful Practical
""" content = html_pattern.sub(new_block, content) content = css_pattern.sub('', content) content = patch1.sub('', content) content = patch2.sub('', content) content = patch3.sub('', content) content = patch4.sub('', content) content = patch5.sub('', content) # Remove scale leftovers from .kmc-third content = re.sub(r'\.kmc-third \.kmc-container,\s*', '', content) content = re.sub(r'\.kmc-third,\s*', '', content) content = re.sub(r'\.kmc-third-grid,\s*', '', content) content = re.sub(r'\.kmc-third h3 \{[^\}]*\}\s*', '', content) content = re.sub(r'\.kmc-third-card \{[^\}]*\}\s*', '', content) content = re.sub(r'\.kmc-third-item-title \{[^\}]*\}\s*', '', content) content = re.sub(r'\.kmc-third-item p \{[^\}]*\}\s*', '', content) with open("tmp_home_updated_block3.html", "w", encoding="utf-8") as f: f.write(content)