/
^[^\S\r\n]*
    (?:
        \s* (?<section>\[[^\]]*\]) [^\S\r\n]* (?<comment>(?:[#;].*)?)
        | (?<comment>(?:[#;].*)?)
        | (?:
            (?<key>[^#;]+?)
            \s* = [^\S\r\n]*
            (?:
                (?:
                    "(?<value_quote>.*)"
                    | (?<value>(?:[^#;\r\n\\\s]*[\s]??(?:\\.)*)*)
                ) [^\S\r\n]* (?<comment>(?:[#;].*)?)
            )
        )
        | (?<error>.*)
    )
$
/
iJxmg