Is it possible to pass host regexp var to headers?

I would know if it's possible to get HostRegexp variable like for example:

HostRegexp(exemple.localhost, {environnment:^admin-([a-z]+)}.exemple.localhost)
where "environnment" are variable

and after put varibable into headers.

Today I don't know how add header in request or response, my tries not working when I see in network console and on server headers, I see same little exemple but maybe it's not like I think it's why I post my ask here.

Thank a lot