From: Wayne Brissette Date: 2013-01-04T06:13:14+09:00 Subject: Suggestions on parsing I'm looking for suggestions on how I might parse this data. addrmap_ntimc0 = insFld(foldersTree, gFld("ntimc0 @0x0.0x0.0x0", "ntimc0_doc.html#addrmap_ntimc0")) addrmap_ntimc0_ntimc_core = insFld(addrmap_ntimc0, gFld("ntimc_core @0x0.0x0.0x0", "ntimc0_doc.html#addrmap_ntimc0_ntimc_core")) reg_ntimc0_ntimc_core_CFG = insDoc(addrmap_ntimc0_ntimc_core, gLnk("R", "CFG @0x0.0x0.0x0", "ntimc0_doc.html#reg_ntimc0_ntimc_core_CFG")) … addrmap_ntimc1 = insFld(foldersTree, gFld("ntimc1 @0x1.0x0.0x0", "ntimc1_doc.html#addrmap_ntimc1")) addrmap_ntimc1_ntimc_core = insFld(addrmap_ntimc1, gFld("ntimc_core @0x1.0x0.0x0", "ntimc1_doc.html#addrmap_ntimc1_ntimc_core")) reg_ntimc1_ntimc_core_CFG = insDoc(addrmap_ntimc1_ntimc_core, gLnk("R", "CFG @0x1.0x0.0x0", "ntimc1_doc.html#reg_ntimc1_ntimc_core_CFG")) What I want to do is group everything starting with the line that includes insFld(foldersTree, So in this abbreviated data, that would be the first line (addrmap_ntimc0) up to the line prior to (addrmap_ntimc1). Normally I would use read in the file, assign it to a variable and then use someVariable.split(" insFld(foldersTree,") However, in this case I want everything from the beginning of that line too. Any ideas? Maybe a different way to parse this data? Thanks, Wayne