It is currently April 27th, 2024, 10:59 pm

crash with RegExpSubstitute

Report bugs with the Rainmeter application and suggest features.
Alex Becherer

crash with RegExpSubstitute

Post by Alex Becherer »

i know, it's probably my fault due to bad understanding of regular expressions, anyways:

using

Code: Select all

RegExpSubstitute=1
Substitute="":"1"
crashes Rainmeter.

type of the measure seems not to matter, happened with both Time and Webparser

Windows 7 SP 1
Rainmeter 2.4.0 beta r1617 64-bit
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: crash with RegExpSubstitute

Post by MerlinTheRed »

You have to give the regex something to match. If you want to match only the empty string, try "^$". If you want to match "only whitespace" also, try "^\s*$".
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Brian
Developer
Posts: 2688
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: crash with RegExpSubstitute

Post by Brian »

This has been fixed for the next beta.

BTW - This was already reported, but somehow slipped through the cracks.

-Brian
Alex Becherer

Re: crash with RegExpSubstitute

Post by Alex Becherer »

thanks :)
i had a solution, using a conditional operator in a Calc measure, but this is much better.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: crash with RegExpSubstitute

Post by jsmorley »

Alex Becherer wrote:thanks :)
i had a solution, using a conditional operator in a Calc measure, but this is much better.
It is really better to use RegExp="^$":"" as that is a valid regular expression, but we have "allowed" for the improper one as it is an easy mistake to make.