![qmapshack review qmapshack review](https://www.saashub.com/images/app/context_images/57/8dfd63e78d5a/gpsbabel-alternatives-medium.png)
SValue = sValue.Substring( 0, sValue.Length - 2) Removing the ending CR // change suggested by Jenda27 // if (sValue.EndsWith("\r\n")) sValue = sValue.Substring(0, sValue.Length - 2) while (sValue.EndsWith( " \r\n")) String sValue = content.Substring(startIndex, lengthIndex) LengthIndex = ((nextMatch.Success) ? nextMatch.Index : content.Length) - startIndex If (sKey.EndsWith( " =")) sKey = sKey.Substring( 0, sKey.Length - 1) SKey = sKey.Substring( 0, sKey.Length - 2) change proposed by Jenda27 // if (sKey.EndsWith("\r\n")) sKey = sKey.Substring(0, sKey.Length - 2) while (sKey.EndsWith( " \r\n")) Retrieve key String sKey = match.Value MatchCollection matches = Regex.Matches(content, searchPattern, RegexOptions.Multiline) / /// The content string to be parsed /// A Dictionary with retrieved keys and remaining content private Dictionary NormalizeKeysDictionary( String content)
#Qmapshack review code#
It returns the output as a dictionary with found matches as dictionary keys and the whole raw text content between the current match end and next match begin as dictionary value.Ĭopy Code /// /// Creates a flat Dictionary using given search pattern It "slices" the raw text content of the whole reg file using a search pattern ^*\\+.
![qmapshack review qmapshack review](https://static.filehorse.com/screenshots/desktop-enhancements/garmin-basecamp-screenshot-01.jpg)
The first parsing function is the NormalizeKeysDictionary function. Iterating through each found text content and parsing registry value names and values.
![qmapshack review qmapshack review](https://www.linuxlinks.com/wp-content/uploads/2018/06/QMapShack.jpg)
#Qmapshack review Pc#
My read function needs less than 5 seconds to read my 30 MB reg file on a standard 3Ghz PC (Windows 7). NET Regex class in some projects and was really amazed at how smart the Regex methods have been coded, working much quicker as for example the String class methods. So I decided to write my own DLL library to read and parse a reg file. I spent some time searching on the Internet for a ready-to-use solution, but all that I found was either another language (C++, VBS) or something not really efficient. 30 MB size, then compare all values with the existing registry values and change some of them - some kind of backup/restore solution for poor men -). In my case, I had to read a reg file of ca. reg file, in order to compare the given registry values or to import only few of the exported registry values. You may already - like me some time ago - have needed a possibility to read and to analyze an exported.