moved all regex lines to one compiled regex object