Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-03-16 15:52
Updated·2023-03-17 09:04
Flavor·ECMAScript (JavaScript)

/
((?:\\033|\e|\\x1B|\\x1b){1}(?:\[(?:=|\?|[0-9]*)[0-9]*[a-gA-GnmsuJKhlHL]{0,1}(?:(?:\;[0-9]*)*m){0,1}))
/
g
Open regex in editor

Description

Use control_sequence_filter group to find and remove ANSI CSI codes. Not tested thoroughly. Only for the task that was necessary for me

Submitted by Leonards Elksnis