Merged
Conversation
carenas
reviewed
Jan 22, 2025
|
|
||
| There are accompanying utility functions for converting glob patterns and POSIX BRE/ERE patterns to PCRE2 regular expressions; and also for performing high-level regular expression operations such as search-and-replace with a powerful replacement string syntax. | ||
|
|
||
| As well as the PCRE2 API, the library also offers a POSIX-compatible `<regex.h>` header and `regexec()` function. However, this does not provide the ability to pass PCRE2 flags, so we recommend users consume the PCRE2 API if possible. |
Contributor
There was a problem hiding this comment.
pcre2posix.h is actually no longer "POSIX" compatible, because it only supports "int" sized offsets
Member
Author
There was a problem hiding this comment.
Well yes, but even glibc has the same problem in their regex.h (_REGEX_LARGE_OFFSETS is not POSIX compliant). The POSIX guys just randomly changed it...
Whenever they fix it so that snprintf returns a size_t, we can worry about regoff_t. There's a vast number of standard C and POSIX C interfaces that incorrectly specify int, and the regex functions are the least of everyone's worries.
We should just ignore the problem, since we didn't start it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.