Created
November 5, 2014 14:50
-
-
Save alexserver/ae17ea2bbca24ffc6b7f to your computer and use it in GitHub Desktop.
Custom configuration to remove garbage from google docs.
This file contains 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
// Configuration for removing html tags enclosing ractive conditionals, and also for removing html tags | |
// Defualt.sublime-commands | |
// To configure the commands that will be available in the command palette (Cmd + shift + P) | |
[ | |
{ | |
"caption": "Reg Replace: Google Docs delete garbage", | |
"command": "reg_replace", | |
"args": {"replacements": ["google_docs_delete_garbage"]} | |
} | |
] | |
// reg_replace.sublime-settings | |
// To configure the searchs with regular expressions, and the replacement. | |
{ | |
"replacements": { | |
// Example replacements | |
"google_docs_delete_garbage": { | |
"find": "<tr((?!>).)+>((?!(</tr>)|(\\{\\{((?!\\{\\{).)+\\}\\})).|\\n)+(\\{\\{\\#((?!\\{\\{).)+\\}\\}|\\{\\{\\/((?!\\{\\{).)+\\}\\})((?!(</tr>)|(\\{\\{((?!\\{\\{).)+\\}\\})).|\\n)+</tr>", | |
"replace": "\\6", | |
"greedy": true, | |
"case": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment