Function isPotentiallyZeroLength

  • Returns whether at least one path of the given element does not consume characters.

    Backreferences

    This function uses the same condition for backreferences as isPotentiallyEmpty.

    Relations

    • isPotentiallyZeroLength(e) -> getLengthRange(e).min == 0

    Parameters

    • element: Alternative | CapturingGroup | ClassRangesCharacterClass | UnicodeSetsCharacterClass | CharacterClassRange | ClassIntersection | ClassStringDisjunction | ClassSubtraction | ExpressionCharacterClass | Group | LookaheadAssertion | LookbehindAssertion | Quantifier | StringAlternative | Backreference | EdgeAssertion | WordBoundaryAssertion | Character | AnyCharacterSet | EscapeCharacterSet | CharacterUnicodePropertyCharacterSet | StringsUnicodePropertyCharacterSet | readonly Alternative[]
    • flags: ReadonlyFlags

    Returns boolean