Extract regexp to constant