mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-12 10:44:31 +01:00
6 lines
118 B
Python
6 lines
118 B
Python
import re
|
|
|
|
|
|
def remove_color_codes(s: str) -> str:
|
|
return re.sub(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])", "", s)
|