Python parsing

20.08.2020 / 0 comments

import pyparsing text = ‘test value: 123<br>’ left = ‘Доступные баллы для списания:’ right = ‘<br>’ rule = pyparsing.nestedExpr(left, right) for match in rule.searchString(text): if match[0].asList(): print(match[0].asList()[0])