Regularity analysis of functions and random processes using wavelets