How to split value in single quotes after specific string

tried not working for Cannot add user. ‘ABC’ does not exist, user is already a member of ‘Test_abc’ group (giving output as T)this but worked for Cannot add user. ‘PQR’ does not exist

error 1] and error 2] i have added for understanding please dont consider that and it is not likke each user contains only 3 letters like abc it may differ like abcd or fdsfss