option for ignoring terminal escape sequences (eg color codes)? #519
Labels
enhancement
An enhancement to the functionality of the software.
question
An issue that is lacking clarity on one or more points.
Feature request: option for ignoring terminal escape sequences (eg color codes); useful for cases where logs contain color codes (http://misc.flogisoft.com/bash/tip_colors_and_formatting) which makes it hard to search for text, eg:
desired behavior:
each line would be piped through a filter to remove such codes before attempting to match anything
More generally, we could have an option to filter lines by a regex replace expression before matching:
rg -replace_by_regex='\e[[\d;]+m' 'FORECOLO' #return match
The text was updated successfully, but these errors were encountered: