How can I match exact strings in Python which can dynamically catch/ignore the following cases?
If I want to get value2 in this IE output "Y" from a file that is formatted as such:
...
--value1 X
---value2 Y
----value3 Z
....
How can I search for the exact match "value2" whilst ignoring the preceding "---", these characters don't allow exact string matching with the "==" operator when searching each line.