regex to constant