import re with open('eid_orders.php', 'r') as f: content = f.read() colors = ['bg-primary-subtle', 'bg-info-subtle', 'bg-warning-subtle', 'bg-success-subtle'] parts = content.split('
') if len(parts) == 5: new_content = parts[0] for i in range(4): new_content += f'
' + parts[i+1] with open('eid_orders.php', 'w') as f: f.write(new_content) print("Patched successfully") else: print(f"Found {len(parts)} parts, expected 5.")