Regular Expressions 101

Community Patterns

1...45678...902

Community Library Entry

0

Regular Expression
Python

r"
^(?P<formula_id>\d+)\. (?P<formula>.+) \[(?P<inference_rule>[\w ]*)(?: (?P<inference_parents>[\d,]+))?\](?: \{(?P<extra>[\w,:-]*)\})?$
"
mg

Description

Parses the output of the automated theorem prover Vampire. Matches the output lines that contain the proof. Run vampire --proof on to generate a compatible string.

Submitted by Filip Bártek - 2 years ago