I wrote a single-file INI parser/editor for .NET that preserves formatting using regex instead of dictionaries with JSON support.

I've been experimenting with a different approach to editing INI files in C#.

Most libraries parse the file into dictionaries or objects and then regenerate the entire file when saving. That works well for configuration data, but it usually destroys comments, blank lines, indentation, entry order, or duplicate keys.

Instead, I treat the INI file as plain text and index it with a single regular expression. The parser stores only regex matches and edits the original text directly, so unchanged parts of the file remain byte-for-byte identical.

Some features: