For your information:

Keys can have square brackets and quotes inside them (but not '\')
In the .REG file they are stored as-is
eg [hkcu\...\test[key"for'your]perusal]

The value-name / value-content pairs use escape sequences
with '\' as the escape character (eg " is \", \ is \\)
 
You should try parsing things like this "string\"quote:1"="first:string\"quote\\d"
Spaces are legal between constructs, eg:
      [hkcu\...]
   "test1"        =        dword:          11223344