We design a double U-shaped ring-based metamaterial, which has a good capability of the realization of sense of refractive indexes. The metamaterial consists of two regularly spaced parallel arrays of U-shaped rings with 90° rotation embedded in a medium, in the top of which an array of holes are dug for sensing unknown materials. Our simulations demonstrate that the structure can recognize subtle changes in refractive indexes of the unknown materials by special resonance frequencies, and it can thus be regarded as a highly sensitive sensor. Furthermore, it could also be integrated into other electronic devices because of its tiny size.