Python Use Variable In Regex String Javascript Mdn Array Methods