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

Dreaded RegEx problem!

$
0
0
Well, maybe that's a little dramatic, but... still a problem :)

Trying to use InlinePattern to reduce the size of the suffix of each displayed Measure value.
I have adapted this from an older RegEx I had, but I don't understand why it doesn't work.

Code:

InlineSetting=Size | 7InlinePattern=^.+ (.+)$\n^.+ (.+) / .+ (.+)$
This is used as a Style, so not every meter is the same. For example, CPU displays Percentage #CRLF# ProcessorName - CPU Speed, RAM displays Percentage #CRLF# RAM used - RAMTotal. Then there's Bin% - Bin Size #CRLF# Bin Items. So I've tried to emulate that, but I don't get it at all.
The notes I have are:

Code:

InlineSetting=Size | 14InlinePattern=.+:.+( .+)
; The InlinePattern is saying:
; . Any character, + one or more times, then ":" then . any character, + one or more times, then ( start capturing a space, then any . character, + one or more times, then ) stop capturing.
This was used to make the seconds text smaller than the Hour/Minutes, which works ok.

Taking RAM for example, I wanted to show it like this:
33 %
7.8 GB / 23.8 GB

But with the red text smaller than the black.

I've tried using that RegEx site and looking up in the manual and also the link provided on the Inline page, but trying to get a specific outcome from it all is just not working for me. Looking at my code, it says:
  • Start of string,
  • Any number of characters,
  • Followed by a space,
  • Start capture,
  • Process the text after the space,
  • End capture
  • New line,
  • Repeat, but with a " / " in the strings path.
Have I got this completely wrong? Most likely! lol
Please help :thumbup:

Statistics: Posted by sl23 — Today, 3:21 pm — Replies 5 — Views 87



Viewing all articles
Browse latest Browse all 482

Trending Articles