Configuration auditing using CiscoConfParse
Applying regular expressions on network configuration to get specific information from the output requires us to write some complex expressions to solve some complex use cases. In some cases, you just need to retrieve some configuration or modify an existing one without going deeply into writing regular expressions, and that was the reason for the birth of the CiscoConfParse
library (https://github.com/mpenning/ciscoconfparse).
CiscoConfParse library
As the official GitHub page says, the library examines an iOS-style config and breaks it into a set of linked parent/child relationships. You can perform complex queries on these relationships:

Source: https://github.com/mpenning/ciscoconfparse
So, the first line of the configuration is considered the parent, while the subsequent lines are considered the children of the parent. The CiscoConfparse
library builds the relationship between parent and child into an object so the end user can easily retrieve...