Bug ID: 2106
Summary: Please add support for parsing POSIX basic & extended
Version: 10.23 (PCRE2)
I'm currently adding support for PCRE v2 to Git. It's impressively faster than
regcomp(), and even now PCRE v1 (after some discussion on the mailing list I
was involved in).
As the pcre2posix(3) manpage notes the POSIX comparability API only provides a
similar-looking C API, whereas the pattern & syntax semantics are still PCRE.
It would be great to have some new API to either make pcre2_compile()
understand different sorts of syntax depending on some flag, or just some
stand-alone function to e.g. convert from POSIX basic or extended to PCRE
This would allow programs like Git which historically have had user-facing
support for multiple pattern types (fixed-string, posix-basic, posix-extended,
pcre) to migrate entirely to PCRE v2 internally, while maintaining user-facing
support for POSIX patterns.
If this isn't implemented I'll most likely hack something like this up myself,
i.e. just provide a shimmy layer for "basic" patterns that converts patterns
like "\(foo\|bar\|)()" to "(foo|bar\)\()", which should be good enough for
But it would be great to have it in the upstream PCRE v2 project so I could
just use that instead.
You are receiving this mail because:
You are on the CC list for the bug.
This message was posted to the following mailing lists: