We study bounds for the Castelnuovo–Mumford regularity of homogeneous ideals in a polynomial ring in terms of the number of variables and the degree of the generators. In particular, our aim is to give a positive answer to a question posed by Bayer and Mumford in What can be computed in algebraic geometry? (Computational algebraic geometry and commutative algebra, Symposia Mathematica, vol. XXXIV (1993), 1–48) by showing that the known upper bound in characteristic zero holds true also in positive characteristic. We first analyse Giusti's proof, which provides the result in characteristic zero, giving some insight into the combinatorial properties needed in that context. For the general case, we provide a new argument which employs the Bayer–Stillman criterion for detecting regularity.