Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #672

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Update README.md #672

merged 1 commit into from
Jan 22, 2025

Conversation

NWilson
Copy link
Member

@NWilson NWilson commented Jan 21, 2025

No description provided.


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pcre2posix.h is actually no longer "POSIX" compatible, because it only supports "int" sized offsets

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@NWilson NWilson merged commit 4f5a2ad into master Jan 22, 2025
33 checks passed
@NWilson NWilson deleted the user/niwilson/readme branch January 22, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants