Compare and filter default groups from all groups

I am trying to create a file having all groups excluding the default groups. Default groups are the groups which are added to user account whenever any user is created like APN All Users, Application Users etc. I have created a constant with default user and trying below.

a!localVariables(
local!groups:rule!UAGR_getAllGroups(),
local!groups1:cons!UAGR_Default_Roles,
expression:union(
rule!UAGR_getAllGroups,
cons!UAGR_Default_Roles
)
)

  Discussion posts and replies are publicly visible