Extract an ANSI escape sequence starting at pos in str. Handles CSI (ESC [), OSC (ESC ]), and APC (ESC _) sequences. Returns null if no escape sequence starts at pos.
pos
str
Extract an ANSI escape sequence starting at
posinstr. Handles CSI (ESC [), OSC (ESC ]), and APC (ESC _) sequences. Returns null if no escape sequence starts atpos.