I find parse a lovely module which is much more intuitive than regular expressions. Thanks!
Most of the times I need to revert to re is when I want to replace text (using re.sub()).
For supporting this it would be great to have
Property Result.span (or .start and .end) -- equivalent to min(span[0] for span in result.spans.values()) and max(span[1] for span in result.spans.values()).
parse.replace(format, string, replacement) and equivalent Parser.replace().
Have you considered adding this?
I do realize it may be out of scope since parse is simply the reverse of format.
Hi,
I find
parse
a lovely module which is much more intuitive than regular expressions. Thanks!Most of the times I need to revert to
re
is when I want to replace text (using re.sub()).For supporting this it would be great to have
Result.span
(or.start
and.end
) -- equivalent tomin(span[0] for span in result.spans.values())
andmax(span[1] for span in result.spans.values())
.parse.replace(format, string, replacement)
and equivalentParser.replace()
.Have you considered adding this?
I do realize it may be out of scope since
parse
is simply the reverse offormat
.