We introduce a class of sets defined by digit restrictions in [Formula: see text] and study its fractal dimensions. Let [Formula: see text] be a set defined by digit restrictions in [Formula: see text]. We obtain the Hausdorff and lower box dimensions of [Formula: see text]. Under some condition, we gain the packing and upper box dimensions of [Formula: see text]. We get the Assouad dimension of [Formula: see text] and show that it is 2 if and only if [Formula: see text] contains arbitrarily large arithmetic patches. Under some conditions, we study the upper spectrum, quasi-Assouad dimension and Assouad spectrum of [Formula: see text]. Finally, we give an intermediate value property of fractal dimensions of the class of sets.