Created
May 16, 2018 09:56
-
-
Save Gaubee/8d08147e5db828c2517815e82c5a71bb to your computer and use it in GitHub Desktop.
remove terminal color.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const color_flag_reg = /((\u001b\[\d+m)+)([\s\S]+?)((\u001b\[\d+m)+)/; | |
s.replace(color_flag_reg, "$3"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment