I have a configuration where I need to check the presence of specific settings within a section of a section of the config. I can't search the whole config because it has the entries of the same thing twice. But the items under the sections are different. Here's a simplified example:
config section 1
config "subsection 1"
setting 1
setting 2
setting 3
next
config "subsection 2"
setting 1
setting 2
setting 3
next
config "subsection 3"
setting 1
setting 2
setting 3
next
end
config section 2
config "subsection 1"
different setting 1
different setting 2
different setting 3
next
config "subsection 2"
different setting 1
different setting 2
different setting 3
next
config "subsection 3"
different setting 1
different setting 2
different setting 3
next
end
In the two sections above they are different names, so I could do a config block to look for "config section 1", but then the subsections need to also be blocks so I can check the settings under each one. "subsection 1" may have the same settings as "subsection 2" in the section 1 block, so I can't just do a text search in the entire block of "config section 1". But if I try to identify the block of "config "subsection 1"" I will get 2 blocks, the one in the first section and the one in the second section.
So my question is how can I check for the presence of specific entries in only the specific block within a specific section? Is there a way to check for a block within a block, or otherwise some sort of nested block checking? Or maybe I'm thinking of this the wrong way?
Sincere appreciation for you reading this post, and even more thanks for the generosity of your suggestions!