@nightgrey/ansi
    Preparing search index...

    Variable COMPLEX_REGEXConst

    COMPLEX_REGEX: RegExp = ...

    Complex regular expression for matching ANSI escape sequences.

    For a simpler regex, see SIMPLE_REGEX.

    This regex provides extensive coverage of ANSI escape sequences including:

    • CSI (Control Sequence Introducer) sequences: ESC[
    • OSC (Operating System Command) sequences: ESC]
    • DCS (Device Control String) sequences: ESC P
    • Multiple terminator sequences (BEL, ESC, ST, backslash)
    • Complex parameter patterns with extended character sets
    • Nested and compound escape sequences

    Use cases:

    • Full ANSI compliance and/or complete parsing
    • Applications needing to handle complex control sequences
    • Situations where missing sequences could break functionality

    Performance: Slower due to complex pattern matching Coverage: ~95%+ of all ANSI escape sequences

    SIMPLE_REGEX

    const terminalOutput = "\x1b[38;2;255;0;0mRed text\x1b]0;Window Title\x07";
    const sequences = terminalOutput.match(COMPREHENSIVE_REGEX);
    // Matches: ["\x1b[38;2;255;0;0m", "\x1b]0;Window Title\x07"]