Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1354

Help: Rainmeter Skins • Re: Webparser: escape RegEx issue?

$
0
0
Something like:

Code:

[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1[Variables]CommonRegEx=(?siU)App2=Electra[MeasureSite]Measure=WebParserURL=file://#CURRENTPATH#Test.htmlRegExp=#CommonRegEx#.*#App2#.*#App2#.*<td>(.*)\sStringIndex=1OnUpdateAction=[!Log "#CommonRegEx#.*#App2#.*#App2#.*<td>(.*)\s"][MeterString]Meter=StringMeasureName=MeasureSiteFontColor=255,255,255,255FontSize=17SolidColor=0,0,0,1AntiAlias=1Text=Version is %1
1.jpg
2.jpg


RegExp is AWAYS case-sensitive, unless you tell it otherwise with the i parameter of the (?siU) metacommand. Please use (?siU) on pretty much all RegExp options. It will cause much better behavior.

What (?siU) at the beginning of a regular expression does is:

( start metacommand
? set the following behaviors for the entire expression
s treat spaces tabs and linefeeds as part of the "any character" set
i ignore case
U be "ungreedy" (get the first instance of a search term, not the last)
) end metacommand


P.S. I have no idea why you are including the phrase "To be able to run the full version" in the RegExp, that doesn't seem to add any value.

Statistics: Posted by jsmorley — 26 minutes ago



Viewing all articles
Browse latest Browse all 1354

Trending Articles