How to split value in single quotes after specific string

Hi @Mathkar_kunal

Try this

(?<=Cannot\s*add\s*user\.\s*‘)(\w+)

Or

(?<=Cannot\s*add\s*user.*)([A-Z]+)

System.Text.RegularExpressions.Regex.Match(Input,"(?<=Cannot\s*add\s*user.*)([A-Z]+)").Value

Regards,