It is currently December 5th, 2021, 2:33 am

RegExp matching error (-1)

Get help with installing and using Rainmeter.
eanyel
Posts: 1
Joined: October 28th, 2021, 1:52 am

RegExp matching error (-1)

Post by eanyel »

Can someone help me please, weather isn't showing up on mine.

Code: Select all

[MeasureCurrent]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=900
Url=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#
RegExp="(?siU)<head>.*<ut>(.*)</ut>.*<dnam>(.*),.*</dnam>.*<tmp>(.*)</tmp>.*<t>(.*)</t>.*<icon>(.*)</icon>"

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureTempUnit]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureCurrent]
StringIndex=1

[MeasureLocation]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureCurrent]
StringIndex=2

[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureCurrent]
StringIndex=3
User avatar
balala
Rainmeter Sage
Posts: 13516
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: RegExp matching error (-1)

Post by balala »

eanyel wrote: October 28th, 2021, 2:06 am Can someone help me please, weather isn't showing up on mine.
No, probably not with this code, because the source is deprecated. Try opening the provided URL (for instance http://wxdata.weather.com/wxdata/weather/local/FRXX0020?cc=*&unit=m - I wrote completely randomly the location code) into a browser and you get the This service is deprecated as of 01/15/2020 result. So, the service doesn't work anymore. The weather skins have been rewritten in meantime, to use newer and working sources. The simplest solution is to look for a skin using one of the new sources on the following links:

https://forum.rainmeter.net/viewforum.php?f=134
https://forum.rainmeter.net/viewtopic.php?f=134&t=34689

There are thousands of such skins, each is working.
If you want to write an own skin, here is an excelent tutorial on how to do this. It is eclectic-tech's post and it can be followed by a beginner as well. Recommend to study it if you are interested.