RegExp should be created outside the loop since minheightCSS is constant throughout all iterations, rather than recreating it on each iteration.