title: What is a regex that will find something and grab what is next to it?
body: <p>I have a project using the forecast API (forecast.io) and I am using the <a href="https://github.com/czarneckid/forecast.io-ruby/tree/master/lib" rel="nofollow">forecast.io</a> wrapper to interact with it. So far as I can tell, the api only returns data like this: </p>
  
  <pre>
  {"latitude":37.8267,"longitude":-122.423,"timezone":"America/Los_Angeles","offset":-7,"currently":{"time":1367169220,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"temperature":59.45,"dewPoint":59.31,"windSpeed":4.38,"windBearing":281,"cloudCover":0.56,"humidity":0.69,"pressure":1017.24,"visibility":9.82,"ozone":326.11},"minutely":{"summary":"Mostly cloudy for the hour.","icon":"partly-cloudy-day","data":[{"time":1367169180,"precipIntensity":0},{"time":1367169240,"precipIntensity":0},{"time":1367169300,"precipIntensity":0},{"time":1367169360,"precipIntensity":0},{"precipIntensity":0,"temperature":58.39,"dewPoint":58.83,"windSpeed":4.23,"windBearing":278,"cloudCover":0.59,"humidity":0.71,"pressure":1017.28,"visibility":9.31,"ozone":326.07},
  </pre>
  
  <p>Now, I want to extract information like pressure, or visibility to use an my app. Since there appears to be no API call to just grab that information, I feel I need to sort it out. </p>
  
  <p>Now, how do I write a regular expression to match for something like temperature, and then grab the information in the quotes next to it? I'd like to send specific information from the APi to variables in my app. EDIT: I found out a regex would be a very bad idea. Great call.</p>
  
  <p>Someone has suggested that I might try look ahead, but perhaps I missing some fundamentally easier solution. <a href="http://www.regular-expressions.info/lookaround.html" rel="nofollow">http://www.regular-expressions.info/lookaround.html</a> outlines the technique which was suggested to me. </p>
  
  <p>EDIT: It has correctly been suggested that I parse this as JSON, and that an expression would be a bad idea. I agree and have implemented this this. I'm still curious about ways you could make this happen with a REGEX if anyone has any creative suggestions. </p>