Extract string to constant