updated auto scaling with Regex.