Useful Regex

Profile Permissions

Use this regex to massively replace profile permissions in your editor.
Note that for the .profile to contain the field permissions, you will have to query both at the same time. This is because the metadata API only gives permissions tied to what you are currently requesting - which also explains some changeset behaviour when deploying profiles.

Replace YOUROBJECTNAMEHERE byt the name of the object you want to set the permissions for. This regex finds permissions for all Custom fields on that object and sets them to TRUE/TRUE (editable, writable).
If you wish to replace permissions accross all custom objects for example, simply replace YOUROBJECTNAMEHERE by .*__c

Find:

(<fieldPermissions>\s*<editable>).*(</editable>\s*<field>YOUROBJECTNAMEHERE.*__c</field>\s*<readable>).*(</readable>\s*</fieldPermissions>)

Replace:

$1TRUE$2TRUE$3


Revision #1
Created 14 August 2019 15:05:44 by Windyo
Updated 14 August 2019 15:05:58 by Windyo