On Sat, Oct 6, 2018, 18:40 Steven D'Aprano email@example.com wrote:
The message I take from this is:
- regex engines certainly can be written to support streaming data;
- but few of them are;
- and it is exceedingly unlikely to be able to easily (or at all) retro-fit that support to Python's existing re module.
I don't know enough about the re module internals to make an informed guess about the difficulty.
On a quick glance, it does seem to store most intermediate match state in explicit structs rather than on the call stack...