I think this is what you are after:
code:
Function udfInDomainGroup($sDomain)
Dim $sGroup
Dim $iIndex

$iIndex=0
$sGroup=EnumGroup($iIndex)
While $sGroup
If Instr($sGroup,$sDomain+"\")=1
Redim Preserve $udfInDomainGroup[Ubound($udfInDomainGroup)+1]
$udfInDomainGroup[Ubound($udfInDomainGroup)]=SubStr($sGroup,InStr($sGroup,"\")+1)
EndIf
$iIndex=$iIndex+1
$sGroup=EnumGroup($iIndex)
Loop
Return
EndFunction