Skip to content

Use a non-backtracking NFA/DFA regex engine where possible #18614

@DemiMarie

Description

@DemiMarie

Stack Exchange suffered an outage due to a regular expression that used quadratic time.

This is a feature request for using a DFA/NFA engine whenever possible – that is, on all regexps that don't have backreferences or any other non-regular features. Note that backreferences almost certainly cannot be handled by any efficient algorithm in general – the matching problem for regular expressions plus backreferences is NP hard.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions