adding global flag to macro regex