A subset C of the vertex set of a graph \(\Gamma \) is said to be (a, b)-regular if C induces an a-regular subgraph and every vertex outside C is adjacent to exactly b vertices in C. In particular, if C is an (a, b)-regular set of some Cayley graph on a finite group G, then C is called an (a, b)-regular set of G and a (0, 1)-regular set is called a perfect code of G. In [Wang, Xia and Zhou, Regular sets in Cayley graphs, J. Algebr. Comb., 2023], it is proved that if H is a normal subgroup of G, then H is a perfect code of G if and only if it is an (a, b)-regular set of G, for each \(0\le a\le |H|-1\) and \(0\le b\le |H|\) with \(\gcd (2,|H|-1)\mid a\) . In this paper, we generalize this result and show that a subgroup H of G is a perfect code of G if and only if it is an (a, b)-regular set of G, for each \(0\le a\le |H|-1\) and \(0\le b\le |H|\) such that \(\gcd (2,|H|-1)\) divides a. Also, in [J. Zhang, Y. Zhu, A note on regular sets in Cayley graphs, Bull. Aust. Math. Soc., 2024] it is proved that if H is a normal subgroup of G, then H is an (a, b)-regular set of G, for each \(0\le a\le |H|-1\) and \(0\le b\le |H|\) such that \(\gcd (2,|H|-1)\) divides a and b is even. In addition, the authors show that if H is a normal subgroup and an (a, b)-regular set of G for some odd integer b, then H is a perfect code of G. We extend this result and we prove the normality condition is not needed.