Extract substring from query results for label vs tooltip

I’m trying to extract a substring from a query using regex for something like this: Login - /web/login.aspx. I would like the Label on a bar chart to show Login and the tooltip to show /web/login.aspx. This is from a InfluxQL query that is populated by JMeter