A tosyl group can function as a protecting group in organic synthesis. Alcohols can be converted to tosylate groups so that they do not react. The tosylate group may later be converted back into an alcohol. The use of these functional groups is exemplified in organic synthesis of the drug tolterodine, wherein one of the steps a phenol group is protected as its tosylate and the primary alcohol as its nosylate. The latter is a leaving group for displacement by diisopropylamine: