osrf_pycommon.terminal_color.ansi_re module
Provides regular expression functions for matching ansi escape sequences.
- osrf_pycommon.terminal_color.ansi_re.remove_ansi_escape_senquences(string)
Removes any ansi escape sequences found in the given string and returns it.
- osrf_pycommon.terminal_color.ansi_re.remove_ansi_escape_sequences(string)
Removes any ansi escape sequences found in the given string and returns it.
- osrf_pycommon.terminal_color.ansi_re.split_by_ansi_escape_sequence(string, include_delimiters=False)
Splits a string into a list using any ansi escape sequence as a delimiter.
- Parameters:
string (str) – string to be split
include_delimiters (bool) – If True include matched escape sequences in the list (default: False)
- Returns:
list of strings, split from original string by escape sequences
- Return type:
list