how to transfer group type to text meanwhile get all information of words

if I toString(1-groupname) just return group:1,

but if i want to transfer (1-groupname) return "1-groupName" both then how to do it?

  Discussion posts and replies are publicly visible