Description
def legacyGroups = new GroupFinder().assignScope("unc:app:its:io:confluence:%").findGroups()
|
legacyGroups.each { g ->
|
// exclude alternate names
|
if (! (g.name ==~ /^unc:app:its:io:confluence.*/)) {
|
return
|
} else {
|
...
|
}
|
}
|
When searching for groups matching a pattern, the result includes groups with name matches, but also when the alternate name matches. If you only want the real names and exclude the alternate names, it's not easy to do. If the alternate name is in a different stem, you can compare the name and see if it matches the original scope. If it's in the same path, I don't know how you would distinguish it.