[Python-ideas] Support parsing stream with `re`
storchaka at gmail.com
Sat Oct 6 04:21:48 EDT 2018
06.10.18 10:22, Ram Rachum пише:
> I'd like to use the re module to parse a long text file, 1GB in size. I
> wish that the re module could parse a stream, so I wouldn't have to load
> the whole thing into memory. I'd like to iterate over matches from the
> stream without keeping the old matches and input in RAM.
How would you match 'a.*b' without loading the whole thing into memory?
More information about the Python-ideas