  Let $X_n = \{1,2,\dots,n\}$ be a finite set $(n\geq 2)$ and $T_n$ the full
transformation semigroup on $X_n$. For a positive integer $l\leq n-1$, we
define $$T_n(l) = \{\alpha\in T_n \colon \forall x,y\in X_n,\, |x-y| = l
\;\Rightarrow\; |x\alpha - y\alpha| = l\}$$ and $$T^*_n(l) = \{\alpha\in T_n
\colon \forall x,y\in X_n,\, |x-y| = l \;\Leftrightarrow\; |x\alpha - y\alpha|
= l\}.$$ Then $T_n(l)$ and $T^*_n(l)$ are subsemigroups of $T_n$. In this
paper, we give a necessary and sufficient condition for $T_n(l)$ to be regular.
Moreover, we prove that $T^*_n(l)$ is a regular semigroup.
