• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Weather forecast

    Mango General
    2
    3
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      StephenVDK
      last edited by phildunlap

      Hello all,
      I'm trying to use regular expressions to pull the weather forecast out of the yahoo weather api, link:
      https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (select woeid from geo.places(1) where text%3D"oakbank%2Cmb")&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys

      Using regex testers, I can pull out the proper data, the high for the next day, using:

      forecast.*?[.*?{.*?{.*?high.*?\"(\d+)
      

      however when it's put into mango, it gives this error:
      Illegal repetition near index 15 forecast.?[.?{.?{.?high.*?"(\d+) ^

      has anyone else been able to properly pull forecast weather or see an issue with my regex?

      Thanks,
      Stephen

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi Stephen,

        I edited your post because text between asterisks is italic.

        The problem is probably caused by your open brace not being escaped. Can you try it with a \ before the {?

        forecast.*?[.*?\{.*?\{.*?high.*?\"(\d+)
        
        1 Reply Last reply Reply Quote 0
        • S
          StephenVDK
          last edited by

          Ya that worked,
          Thank you

          1 Reply Last reply Reply Quote 0
          • First post
            Last post