1) Give a description of the problem
Trying to figure out a way to pull subset strings out of a larger string. The Weather function $weather.forecast.forecast.txt_forecast.forecastday.fcttext gives a three day forecast, day and night with a separator of “.,” between each day and each night’s forecast. I want to pull out each day and night and announce via TTS. I can use the functions Indexof() and mid() like in my example piston below to get to the first instance of “.,” but can’t figure out how to use functions to pick a part the three day forecast and break into three strings of tomorrow (the one i’m interested in), the next, and the next)
An Example 3 day forecast: [Periods of rain. High 47F. Winds N at 10 to 15 mph. Chance of rain 100%. Rainfall near a half an inch., Rain showers this evening with clearing overnight. Low 38F. Winds WNW at 5 to 10 mph. Chance of rain 40%., Partly cloudy skies. High around 55F. Winds W at 5 to 10 mph., Partly cloudy skies early will become overcast later during the night. Slight chance of a rain shower. Low 42F. Winds SE at 5 to 10 mph., A steady rain in the morning. Showers continuing in the afternoon. High 52F. S winds shifting to W at 10 to 15 mph. Chance of rain 80%. Rainfall near a quarter of an inch., A mostly clear sky. Low 33F. Winds WNW at 10 to 15 mph., Partly cloudy skies. High 44F. Winds WNW at 10 to 15 mph., A few clouds from time to time. Low 29F. Winds NW at 5 to 10 mph.]
2) What is the expected behavior?
The time is w. The current weater is x. Today’s forecast is y. Tomorrow’s forecast is z
3) What is happening/not happening?
Not sure how to use function statements to pull out substrings between ".,
**4) Post a Green Snapshot of the piston!