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

Help: Rainmeter Skins • Re: Regular Expressions

$
0
0
Thought I had RegExp about figured out but silly me! I have been working on this issue for a while with no luck if it's even possible.

Here's the issue. The Webparser gets a number and I need to convert that number to an index value. For example, the number can be between 0 and 359. I would like regexp to substitute [0-59] to 1, [60-99] to 2, [100-139] to 3, [140-250] to 4, and [251-359] to 5. Is there a simple way to accomplish this? I do have a working formula but it tests each individual digit and it gets rather long since some of the measures' numbers are 6 digits long. I'm trying to shy away from using ifcondition statements since there will be 5 indexes to test for on multiple measures and I think the substitute would involve less coding.

Thanks for any help.
Any particular reason you are trying to do this with regexps instead of something much simpler, like a Calc measure? Regexps are for parsing strings (including strings of numbers), not for evaluating numeric values.

Statistics: Posted by SilverAzide — Yesterday, 9:10 pm



Viewing all articles
Browse latest Browse all 1587

Trending Articles