Find and replace specific text in Note Field in Contacts

I have many contacts with text that has been added by Outlook in the Note Field that I need deleted but not the complete text in the Note field.

The text that I need removed is “This contact is read-only. To make changes, tap the link above to edit in Outlook.” I would like this deleted all together.

Any help with the proper script will be appreciated.

Are your contacts from some exchange-type setup? For example, OWA?

The reason I ask is that there seems to be a difference between ‘regular’ and synced contacts.

Yes they were at one point and the information got corrupted

I’m not sure whether they can be edited directly. I tried with some of my old contacts and while the edits seemed to be processed, the warning text wouldn’t go away.

On a whim, I tried exporting to vcard, editing the vcard and then re-importing into contacts as a new entry. That seemed to work.