Skip to content

[pcre] Scoped inline flags not supported ((?i:...), (?m-i:...)) #32

@jbachorik

Description

@jbachorik

Summary

Scoped inline flags (flags applied to a sub-expression only) are not yet supported. Global flags like (?i) work correctly, but scoped forms like (?i:...) that apply only within a group boundary fail.

Failing PCRE Tests

  • (?i)^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z) — expected behavior per PCRE specification

Expected gain: +4 PCRE conformance tests (currently failing in Category 9)

Root Cause

The parser/NFA builder handles flags globally. Scoped flag changes (e.g., (?i:expr) or (?m-i) within a group) require pushing/popping the flag state during pattern traversal.

Implementation Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions