Regularity results for nonlinear wave equations