title: Replace instance label with regex
body: <p>I'm trying to replace the instance label of a given job. I understand that I can do this with the <code>relabel_config</code>. But I struggle with the regex and regex replace stuff.</p>
  
  <p>My targets have an obscure target url like <code>test1.mysite.de</code>. There are reasons why I can't change these, so I need to do some relabeling.</p>
  
  <p>This is my current config:</p>
  
  <pre><code>relabel_configs:
    - source_labels: [__address__]
      target_label: instance
      regex: ^test.*
      replacement: server
  </code></pre>
  
  <p>But this relabels the url to <code>server</code>. What's my mistake?</p>