How to rewrite label values?

We use promtail to scrape the systemd journal and label the logs by systemd unit. On some systems, a lot of session-<some-string>.scope units with very few logs are generated, which cause a lot of nearly-empty log chunks to be created. How can we rewrite the label value based on a regext, so that unit=session-abc123xyz.scope becomes unit=session.scope?