Test, validate and match regular expressions
Matches the final segment of a Windows registry key path by capturing one or more non-backslash characters that appear immediately after a backslash and directly before a closing bracket at the end of the string. For example, in '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows]', it extracts 'Windows'. This is useful for parsing .reg files or registry exports to isolate the last subkey name.