We develop a method for estimating the Hurst function of a multifractional Brownian motion, which is an extension of the fractional Brownian motion in the sense that the path regularity can now vary with time. This method is based on a local estimation of the second-order moment of a unique discretized filtered path. The effectiveness of our procedure is investigated in a short simulation study.