We establish the stability under perturbations of the dynamics defined by a sequence of linear maps that may exhibit both nonuniform exponential contraction and expansion. This means that the constants determining the exponential behavior may increase exponentially as time approaches infinity. In particular, we establish the stability under perturbations of a nonuniform exponential contraction under appropriate conditions that are much more general than uniform asymptotic stability. The conditions are expressed in terms of the so-called regularity coefficient, which is an essential element of the theory of Lyapunov regularity developed by Lyapunov himself. We also obtain sharp lower and upper bounds for the regularity coefficient, thus allowing the application of our results to many concrete dynamics. It turns out that, using the theory of Lyapunov regularity, we can show that the nonuniform exponential behavior is ubiquitous, contrarily to what happens with the uniform exponential behavior that although robust is much less common. We also consider the case of infinite-dimensional systems.