views:

375

answers:

3

More specifically, what is the authoritative source for that information?

This may look like a non-programming question, but I need to know whether a registry path fed to my code contains a regular expression or not. I decided the best way to do that is assume that any occurrence of an invalid character (like '*') means a wildcard search.

A: 

It depends.

This link will be helpful for you:

http://en.wikipedia.org/wiki/Windows_Registry

joe
+5  A: 

For allowable key and value names, see the MSDN page on Structure of the Registry. In particular:

Each key has a name consisting of one or more printable characters. 
Key names are not case sensitive. Key names cannot include the backslash
character (\), but any other printable character can be used. Value names
and data can include the backslash character.

Registry value types are explained in detail on MSDN here, in case you need to know the allowable values.

Reed Copsey
Thanks! I should develop the habit of searching specifically in that site, instead of googling like a headless chicken.
JCCyC
No problem. Any time you want authoritative info on Windows, MSDN is the place to look... I still use google for my msdn searches, though - just restrict the site to MSDN.
Reed Copsey
A: 

For all things Windows, MSDN has to be the authoritative source -- the article on Registry Element Size Limits implies Unicode is good and Structure of the Registry says that backslash and non-printable characters are disallowed in key names. Values merely have to be entirely printable characters.

Rowland Shaw
-1 Until I can figure out what this adds over the other answer (I'd even switch it to a +1 if it called out something that the other answer doesnt mention)
Ruben Bartelink
Why the (late) and anonymous downvote?
Rowland Shaw