Fix getReferences regex issue