Consider optimizing regex evaluation in cases where we don't need full match

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2025-09-15
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For $regex find operator and $regexMatch we only need boolean answer - matches or not.

      For $regexFind we need only the first match and only for $regexFindAll we need all matches and captures.

      However, currently it looks like that pcre2_match function works until it finds all matches.

      We should look into passing a "limit" on the number of matches that we need to find.

      pcre2_match function returns as soon as it finds the first match.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: