Add the following two options to the WebParser measure:
Code: Select all
RegExpSubstitute=1
Substitute="^0(.):(..)$":"\1:\2"
Add the following two options to the WebParser measure:
Code: Select all
RegExpSubstitute=1
Substitute="^0(.):(..)$":"\1:\2"
balala wrote: ↑December 28th, 2018, 8:44 pm Add the following two options to the WebParser measure:I suppose there is no space between the colon and the minutes. In five of the above examples you have a such space, in one you haven't. If there is a such space, add it to the above Substitute option as well.Code: Select all
RegExpSubstitute=1 Substitute="^0(.):(..)$":"\1:\2"
Hey balala, Do you have another one but for RGB strings?balala wrote: ↑December 28th, 2018, 8:44 pm
Add the following two options to the WebParser measure:I suppose there is no space between the colon and the minutes. In five of the above examples you have a such space, in one you haven't. If there is a such space, add it to the above Substitute option as well.Code: Select all
RegExpSubstitute=1 Substitute="^0(.):(..)$":"\1:\2"
I'm not balala, but since I saw this, you can try...
Code: Select all
RegExpSubstitute=1
Substitute="(\d+)":"00\1","\d+(\d{3})":"\1"
Yincognioto posted the solution, so I don't, instead just asking: even if possible, why to do this? I mean that I don't see a reason why would you like to do such a substitution. Maybe I am missing something, but in my opinion at least doesn't really make sense. However as you saw above in Yincognito's reply, this is perfectly possible, if needed.
I suppose one reason could be that in some fonts, having the same number of digits for two such RGB sets would "align" them with one another (e.g. red value under red value, and so on). Just guessing, could be some other more "functional" reason for it.
Good point, didn't think to this.Yincognito wrote: ↑April 10th, 2024, 3:28 pm I suppose one reason could be that in some fonts, having the same number of digits for two such RGB sets would "align" them with one another (e.g. red value under red value, and so on).
Yeah, when such parts are displayed in a single meter (or multiple, if one below the others), it often looks better than having the string all over the place (even if centered).
Thanks Yin, it worksYincognito wrote: ↑April 10th, 2024, 8:29 am I'm not balala, but since I saw this, you can try...
This is untested, but it should work for any integer in a string, assuming that sufficient leading zeros are added in the 1st part of the Substitute, and that the desired number of digits are kept in its 2nd part.Code: Select all
RegExpSubstitute=1 Substitute="(\d+)":"00\1","\d+(\d{3})":"\1"
As Yin already mentioned. It's for design and alignment reasons. I'm making a color selector and I don't like it when the numbers are drifting and changing number of characters. So i'm using a Monospaced font to avoid it, and the substitution to ensure it always takes the same space. You'll see what I'm talking about when I release it soon, it's almost finished.