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

Replace current regex engine with PCRE2 #4033

Closed
wants to merge 1 commit into from
Closed

Commits on Feb 3, 2024

  1. Replace OpenBSD regex library with PCRE2.

    PCRE2 has way better performance than the OpenBSD
    library (something around 20 times faster).
    
    The following flags are enabled for every pattern:
    
    - PCRE2_UTF
    - PCRE2_MATCH_INVALID_UTF
    - PCRE2_NO_UTF_CHECK
    
    All the others are optional.
    
    Changes made:
    
    - Adds PCRE2 as subproject.
    - Changes the API away from POSIX to PCRE2.
    - Edits many regex patterns because:
     - ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now.
     - '.' doesn't match newlines by default.
    - Changes the API so matches and their groups are bundled into PVectors.
    - Moves the regex component to rz_util.
    Rot127 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    d11a763 View commit details
    Browse the repository at this point in the history