Regular expression against a variable to create another variable

Basically I have two scrape targets.

  1. windows_exporter
  2. vsphere-graphite

I would like to include relevant metrics from VMWare on the same dashboard and match the selector that is grabbed from the instance name which matches name on the vsphere metric minus everything after the ‘.’ /^([^.]+)/