This paper is about the nonlinear error feedback regulator problem. The plant is a nonlinear finite-dimensional single-input-single-output system and it is locally exponentially stable around the origin. It is driven by a linear exosystem with simple eigenvalues on the imaginary axis. The reference signal that the plant output must track is obtained from the state of the exosystem, in a nonlinear way. The regulator problem is to design a dynamic feedback controller, with the tracking error as its input and the control input to the plant as its output, such that (i) the closed-loop system of the plant and the controller is locally exponentially stable and (ii) the tracking error tends to zero for all sufficiently small initial conditions of the plant, the controller and the exosystem. Under the assumption that the regulator problem is solvable, i.e., there exists a solution to the so-called nonlinear regulator equations, we propose a nonlinear controller of order equal to that of the exosystem to solve the regulator problem. In contrast, previous results on the regulator problem have typically proposed controllers of a larger order. The motivation for the nonlinear controller designed in this work is the structure of a linear controller that solves the regulator problem for the plant linearized around the origin, when the reference and disturbance signals are linear functions of the exosystem state. The nonlinear controller has the same state and control operators as the linear controller and the linearization of its (possibly nonlinear) observation operator is the observation operator of the linear controller. An example and a counterexample illustrating the theory are presented.