Remove access from workflow

Hi Team,
I am also building similar workflow to remove accessprofiles to identites. Here I need to remove accessprofiles only which follows specific pattern from list of accessprofiles identity has.
eg: identity has some 3 access profiles
1.Black: approver-p-task
2.prop: financial
3.Black:approver-p-task
here I need to remove accessprofiles which follows this pattern starts with “Black” and contain substring “-p-”
I tried using GET ACCESS and MANAGE ACCESS but not achieved can anyone suggest any ways to achieve by using workflows.