github.com/johnsiilver/halfpike (go): Package halfpike provides a lexer/parser framework library that can simplify lexing and parsing by using a very limited subset of the regexp syntax. This prevents many of the common errors encountered when trying to parse output from devices where the complete language syntax is unknown and can change between releases.  Routers and other devices with human readable output or badly mangled formats within a standard (such as XML or JSON).  Called halfpike, because this solution is a mixture of Rob Pike's lexer talk and the use of regex's within a single line of output to do captures in order to store a value within a struct type.  A similar method replaced complex regex captures at a large search company's network group to prevent accidental empty matches and other bad behavior from regexes that led to issues in automation stacks.  It allowed precise diagnosis of problems and readable code (complex regexes are not easily readable).
Keywords: devops|golang|sre