One of the best thing about this lib is the matching on streams. However, capturing may take as much RAM as the full data itself, therefore rendering the matching stream useless. extract() would return an iterator that would yield capturing groups as soon as there is one available. But I'm not quite sure how to implement this. As long as there is more than one state matched then there is no way to know which one will contain the right captured data. One way may be keeping the captured data until there is just one current match and then yielding :thinking:
One of the best thing about this lib is the matching on streams. However, capturing may take as much RAM as the full data itself, therefore rendering the matching stream useless.
extract()
would return an iterator that would yield capturing groups as soon as there is one available. But I'm not quite sure how to implement this. As long as there is more than one state matched then there is no way to know which one will contain the right captured data. One way may be keeping the captured data until there is just one current match and then yielding :thinking: