Field replace in KQL

Can anyone tell me what the correct syntax for using the field replace method in a KQL query should be?

Accepteula value = “Accept the {{ EULA }}”
accepteula: "page.accepteula.value.replace(['EULA' => 'test'])"

Thanks

Try page.accepteula.replace(['EULA' => 'test']), because value when used without a parameter returns a string, and so calling replace won’t work, i.e. in PHP it will throw a “Call to a member function replace() on string” error.