On one of my skins im making in rainregexp. if i enter :
(?siU)<td class="value">(.*)</td>
it actually brings back all the strings results i need in 1 ie.
01=> 96.77
02=> 106.77
03=> 96.77
04=> 292.73
05=> 244.89
06=> 3.54
07=> 2.83
08=> 2.97
09=> 29.17
10=> 28.77
11=> 27.50
how would i go about putting all of theses results in different meters ? (if i can)
am i being dumb - it just confused me that i get all the results i needed from 1 search !
hope this makes sense. thx in advance !
----------------------------------------------------------
actually a more pertinent question is - how do you get over the 'only having one line' search ?
ie. if i wanted to use :
(?siU)<ul class="numbers">
<li>(.*)</li>
how would i go about making it correct ?
...sorry im such a noob, but i really want to get the hang of this webparsing business as i can see how powerful it really is !!
It is currently May 1st, 2024, 6:04 pm
Quick question regarding web parsing (i know, i know !)
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Quick question regarding web parsing (i know, i know !)
Rainmeter actually won't return them all. RainRegExp (and standard Regular Expression) will, but Rainmeter is designed to return the first result in (.*), and is "ungreedy" by nature, to eliminate runaway regular expressions.
So, RegExp="(?siU)<td class="value">(.*)</td>" will return 96.77 in StringIndex=1 in your example. To get them all, you would use :
Then you would create "child" WebParser measures to get each of the 8 StringIndex results. So you could do something like:
So, RegExp="(?siU)<td class="value">(.*)</td>" will return 96.77 in StringIndex=1 in your example. To get them all, you would use :
Code: Select all
RegExp="(?siU)<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>.*<td class="value">(.*)</td>"
Code: Select all
[Rainmeter]
Update=1000
[Variables]
Capture=<td class="value">(.*)</td>.*
[MeasureSite]
Measure=Plugin
Plugin=WebParser.dll
URL=http://somesite.com
RegExp="(?siU)#Capture##Capture##Capture##Capture##Capture##Capture##Capture##Capture#"
[MeasureCap1]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=1
[MeasureCap2]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=2
[MeasureCap3]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=3
[MeasureCap4]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=4
[MeasureCap5]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=5
[MeasureCap6]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=6
[MeasureCap7]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=7
[MeasureCap8]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureSite]
StringIndex=8
[TextStyle]
X=0
Y=1R
FontSize=10
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
[MeterCap1]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap1
[MeterCap2]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap2
[MeterCap3]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap3
[MeterCap4]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap4
[MeterCap5]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap5
[MeterCap6]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap6
[MeterCap7]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap7
[MeterCap8]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureCap8
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: Quick question regarding web parsing (i know, i know !)
wow - thanks. brilliant explanation ! you make it seem so simple !!