Trying to parse string from a website that gives device status with a value at the end

I’m using ruby and trying to get a value from a string that I received from an URI.PARSE.

Below is what I get back from the URI.PARSE and is in my string. You can see it in the result at the bottom. Q8:0; I only need the Device which in this case is Q8 and the value is 0. The device is always a string but sometimes the value is a string and sometimes a integer. I want to be able to evaluate this result to do events based on the values.

html code>Q8:0;html code

Ruby is the best programming language in the world - Ruby on Rails.