regex-explain - v1.6.0
    Preparing search index...

    Function explainRegex

    • Explains a regex pattern compiled with the given flags. Syntax errors are returned, not thrown.

      Parameters

      • pattern: string

        The pattern without surrounding slashes, as passed to new RegExp().

      • Optionalflags: string

        The flags, such as "gi".

      • Optionaloptions: ExplainOptions

        Analysis options.

      Returns ExplainResult

      The explanation, or the reason the pattern is invalid.