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

Help: Rainmeter Skins • Re: Lookaround regex for some help

$
0
0
Now if I have these two possibilities:

Code:

<dewpoint ...>...</dewpoint><pressure ...>...</pressure>
and

Code:

<dewpoint ...>...</dewpoint><windchill ...>...</windchill><pressure ...>...</pressure>
where 'windchill' may be present or may be completely absent, how do I capture the value between '>' and '<' for each of the three, with the windchill value being empty (or any single known character) in the event of the windchill tag being absent?

I know that after the dewpoint tag, I can use a lookahead for the windchill tag, but the problem is that I cannot simply use </dewpoint>(?(?=.*<windchill)...|...) because there could be windchill tags further on in later sections. So I need to look ahead for the windchill tag immediately following the dewpoint tag. But, I'm not sure how to account for the linebreak inbetween the two tags. Do I need to place a newline in the lookahead?

Statistics: Posted by qwerky — Yesterday, 8:15 pm



Viewing all articles
Browse latest Browse all 1568

Trending Articles