revised expression for identifying and setting regexes