Let T (X) (resp. L(V)) be the semigroup of all transformations (resp. linear transformations) of a set X (resp. vector space V ). For a subset Y of X and a subsemigroup S(Y ) of T (Y ), consider the subsemigroupWe give a new characterization for T S(Y ) (X) to be a regular semigroup [inverse semigroup]. For a subspace W of V and a subsemigroup S(W ) of L(W ), we define an analogous subsemigroup L S(WWe describe regular elements in L S(W ) (V ) and determine when L S(W ) (V ) is a regular semigroup [inverse semigroup, completely regular semigroup]. If S(Y ) (resp. S(W )) contains the identity of T (Y ) (resp. L(W )), we describe unit-regular elements in T S(Y ) (X) (resp. L S(W ) (V )) and determine when T S(Y ) (X) (resp. L S(W ) (V )) is a unit-regular semigroup.L S(W ) (V ) = {f ∈ L(V ) : f ↾W ∈ S(W )},