Explicit polynomial expansions of regular real functions by means of Bernoulli polynomials and boundary values