I have a workaround and that is to change the {1,2} to {2} which is probably a better option as the time format will, I assume always have two digits but should {1,2} not match correctly in Rainmeter?
I have a workaround and that is to change the {1,2} to {2} which is probably a better option as the time format will, I assume always have two digits but should {1,2} not match correctly in Rainmeter?
thanks,
Hedley
apart from that you use /g (that is the global flag in https://regex101.com/r/gMHSt4/4 and in rainmeter it does not work) ... but simply put \s+ after ")"
I also would like to add three things, beside what SilverAzide and FreeRaider said:
Why have you put those question marks there? First I'd remove them ((?siU)<observation_time_rfc822>.*[color=#FF0000]?[/color](\d{1,2}:\d{1,2}:\d{1,2}).*[color=#FF0000]?[/color]</observation_time_rfc822>).
The second step would be to add a space both before and after the matching string (this is practically the same solution as FreeRaider's one).
And a last recommendation would be to avoid the need os having after the observation_time string, the rfc822 string. Not knowing your source and how does it behaves, I'm not sure, but would say there the string can change. That's why I'd use there a .*.
All these being said, here is my propose on the RegExp: RegExp=(?siU)<observation_time.*>.* (\d{1,2}:\d{1,2}:\d{1,2}) .*</observation_time.*>.
See the space between the <observation_time.*>.* and the matched numbers, respectively between those numbers and the final .*</observation_time.*>. Using FreeRaider's solution, this would be: RegExp=(?siU)<observation_time.*>.*\s+(\d{1,2}:\d{1,2}:\d{1,2})\s+.*</observation_time.*>.
balala wrote:I also would like to add three things, beside what SilverAzide and FreeRaider said:
Why have you put those question marks there? First I'd remove them ((?siU)<observation_time_rfc822>.*[color=#FF0000]?[/color](\d{1,2}:\d{1,2}:\d{1,2}).*[color=#FF0000]?[/color]</observation_time_rfc822>).
The second step would be to add a space both before and after the matching string (this is practically the same solution as FreeRaider's one).
And a last recommendation would be to avoid the need os having after the observation_time string, the rfc822 string. Not knowing your source and how does it behaves, I'm not sure, but would say there the string can change. That's why I'd use there a .*.
All these being said, here is my propose on the RegExp: RegExp=(?siU)<observation_time.*>.* (\d{1,2}:\d{1,2}:\d{1,2}) .*</observation_time.*>.
See the space between the <observation_time.*>.* and the matched numbers, respectively between those numbers and the final .*</observation_time.*>. Using FreeRaider's solution, this would be: RegExp=(?siU)<observation_time.*>.*\s+(\d{1,2}:\d{1,2}:\d{1,2})\s+.*</observation_time.*>.
Hi,
the question mark is there as it makes it not-greedy.
Or does in Perl. As far as I know...
The source xml has the following options for the time:
DigitalEssence wrote:Whether this may change or not I don't know.
It will not, which is nice. The reference in the tag to "rfc822" means that this is a timestamp formatted per RFC-822. You can safely parse this without worrying about a format change.
And I was hoping that because it was formatted to rfc822 that I was safe but in the short period I have been active on this forum, I'm learning not to assume anything