I have a quite big custom made config file I need to extract data from once a week. This is an "in house" config file which doesn't comply to any know standard like INI or such.
My quick and dirty approach was to use re to search for the section header I want and then extract the one or 2 lines of information under this header that I want. This is proving quite a challenge and I'm thinking there must be a easier/more reliable way of doing this, but I keep thinking that I will need to implement a full parser to parse this file and then only to extract the 5 lines of data I need.
The "sections" looks something like this:
Registry com.name.version =
Registry "unique-name I search for using re" =
String name = "modulename";
String timestamp = "not specified";
String java = "not specified";
String user = "not specified";
String host = "not specified";
String system = "not specified";
String version = "This I want";
String "version-major" = "not specified";
String "version-minor" = "not specified";
String scm = "not specified";
String scmrevision = "not specified";
String mode = "release";
String teamCityBuildNumber = "not specified";
;