Use RG structure to compare seen IDs instead of regexp