import re with open('ui/components/AdminRolesPage.tsx', 'r') as f: content = f.read() role_form = """ """ role_form_replacement = """

Define a global shared role or an application-scoped custom grant.

""" content = content.replace(role_form, role_form_replacement) with open('ui/components/AdminRolesPage.tsx', 'w') as f: f.write(content) print("Replaced Roles Form!")