Extrapolating data from variable

I have a 1st variable called jmx_agent_url that is an output of an InfluxDB query:

service:jmx:rmi:///jndi/rmi://10.1.15.110:6091/jmxrmi
service:jmx:rmi:///jndi/rmi://10.1.15.110:6092/jmxrmi
service:jmx:rmi:///jndi/rmi://10.1.15.110:6093/jmxrmi
service:jmx:rmi:///jndi/rmi://10.1.15.110:6094/jmxrmi
service:jmx:rmi:///jndi/rmi://10.1.15.110:6095/jmxrmi

I wanted to re-use the output of this variable in a 2nd variable, which I call ip_address. I wanted to use the regex .*\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.* as filter so I get something like 10.1.15.110. If the user selects a value from the first variable (jmx_agent_url), it will automatically update the 2nd variable (ip_address). Is this possible in Grafana?