Pull out the device from the URI string.