Last active
August 29, 2015 14:22
-
-
Save sundaycrafts/9f3e647753ca585e12f1 to your computer and use it in GitHub Desktop.
useful regular expression
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
# get 4 spaces indents(it is not works perfectly but enough) | |
/(?<!\S) {4}/ | |
# erace padding text such as ctrl char when logging bash log by [script] command | |
s/((?![\n\t])[[:cntrl:]])|(\[.*?(m|k))//g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment