cleaning up usage of regex file