In article <CAJgzZop3zkGY=U-LJdTdO5irKoqEceZPDdje5tmUxo=nj0d...@mail.gmail.com>, enh <e...@google.com> wrote: >-=-=-=-=-=- > >ah, thanks for that link. stupidly, although i'd seen that the NetBSD >changes were syncing with FreeBSD, i didn't go to look at the original >FreeBSD commits. > >cool, that sounds like i (a) have a clear "why" argument should anyone ask, >and (b) a ready-made `PFLAG_LEGACY_ESC` escape hatch for backwards >compatibility. > >i'll be interested to see what iOS/macOS does here (because ideally Android >and iOS would do the _same_ thing so there's less for mobile developers to >worry about!). oh... looks like they use TRE instead? >https://opensource.apple.com/source/Libc/Libc-1439.141.1/regex/ >interesting; i thought it was only musl that used TRE behind the scenes. >
That (using TRE) is a strange choice. TRE seems to be not actively supported: https://laurikari.net/tre/, https://github.com/laurikari/tre/. We also toyed around with the idea of replacing the Spencer regex in libc with TRE, but encountered various issues, one of them being extreme memory use, and another TRE being left-associative where spenser is right-associative: https://nxr.netbsd.org/xref/src/tests/lib/libc/regex/Makefile https://nxr.netbsd.org/xref/src/tests/lib/libtre/Makefile All of them fail some of the tests :-) Best, christos