On 2016-12-15 15:30, Paul Eggert wrote: > On 12/15/2016 11:00 AM, Clément Pit--Claudel wrote: >> I've had a quick look at the existing options. Here's what I >> gathered (the list below includes only libraries whose licensing is >> compatible with Emacs): >> >> * There are only two usable, non-backtracking regexp libraries: - >> RE2 ... - TRE ... > > Another library is in that list: > > - The GNU C library, which ordinarily uses a DFA but which uses > backtracking if needed. > > That is, the current glibc implementation is now quite different from > the old version that the Emacs matcher is derived from. Thanks! I'm surprised that I didn't find out about this while looking around. Does it support something like PCRE_PARTIAL in pcre2_dfa_match? That would make it trivial to extend it to a gap buffer. Cheers, Clément.