﻿file = r'resources\views\panel-tests\divisi\create.blade.php'
with open(file, 'r', encoding='utf-8') as f:
    c = f.read()

old = '                        </div>\n\n                        {{-- Region --}}'
new = '                        </div>\n                        @endif\n\n                        {{-- Region --}}'

if old in c:
    c = c.replace(old, new, 1)
    print("OK!")
else:
    print("GAGAL - cek exact:")
    idx = c.find('{{-- Region --}}')
    print(repr(c[idx-80:idx+20]))

with open(file, 'w', encoding='utf-8') as f:
    f.write(c)
