﻿file = r'resources\views\public-test\fill.blade.php'
with open(file, 'r', encoding='utf-8') as f:
    c = f.read()

old = "    const allNotes = document.querySelectorAll('textarea[name^=\"notes[\"]');"
new = "    const allNotes = document.querySelectorAll('textarea.required-note');"

if old in c:
    c = c.replace(old, new)
    print("OK!")
else:
    print("GAGAL")

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