It is currently March 29th, 2024, 10:39 am

Convert lowercase to uppercase

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Convert lowercase to uppercase

Post by jsmorley »

balala wrote:Yes, probably ">" and "<" are good ideas.
About the reserved characters, are the "{" and "}" also reserved, beside those listed by you?
Not exactly, they are treated as directives to a regular expression only when they are in a pattern that is [a-z ect.]{n,m}, or in other words as a "{quantifier}" for a "[character class]". They are not in and of themselves reserved, although I'd be tempted to avoid them. Given that, they are also allowed in Windows paths.

These characters are not allowed in Windows folder or file names:

< > : " / \ | ? *

These are reserved characters in regular expression:

[ \ ^ $ . | ? * + ( )

So if we line up and only consider characters that are both always treated as a literal in regular expression and not allowed in Windows folder or file names, we are left with:

<
>
:
"
/

However, while you can't create a folder or file with a "/" in it, it is allowed as the separator in a path in Windows when you "use" it to reference a path, so I'd be tempted to stay away from that. I'd stay away from : and ", as those might confuse the Substitute option itself, or at least make it hard to read. That leaves < and >. Those are not allowed in Windows paths, and have no meaning whatsoever in regular expression or the Substitute option.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Convert lowercase to uppercase

Post by balala »

jsmorley wrote:Not exactly, they are treated as directives to a regular expression only when they are in a pattern that is [a-z ect.]{n,m}, or in other words as a "{quantifier}" for a "[character class]". They are not in and of themselves reserved, although I'd be tempted to avoid them. Given that, they are also allowed in Windows paths.

These characters are not allowed in Windows folder or file names:

< > : " / \ | ? *

These are reserved characters in regular expression:

[ \ ^ $ . | ? * + ( )

So if we line up and only consider characters that are both always treated as a literal in regular expression and not allowed in Windows folder or file names, we are left with:

<
>
:
"
/

However, while you can't create a folder or file with a "/" in it, it is allowed as the separator in a path in Windows when you "use" it to reference a path, so I'd be tempted to stay away from that. I'd stay away from : and ", as those might confuse the Substitute option itself, or at least make it hard to read. That leaves < and >. Those are not allowed in Windows paths, and have no meaning whatsoever in regular expression or the Substitute option.
Thanks for these details. I probably will use < or/and >.
Many thanks for all the given help to figure this out.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Convert lowercase to uppercase

Post by jsmorley »

I think we can consider this bone well-chewed indeed.. ;-)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Convert lowercase to uppercase

Post by balala »

jsmorley wrote:I think we can consider this bone well-chewed indeed.. ;-)
Yep, we can for sure...
:17good