Last active
October 12, 2015 07:17
-
-
Save JorgenHookham/3990573 to your computer and use it in GitHub Desktop.
regex_toolbelt.js
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
///////////////////// | |
// Merge Conflicts // | |
///////////////////// | |
(?s)<<<<<<< HEAD(.*?)=======(.*?)>>>>>>> [a-z_0-9\-]+ | |
/////////////////// | |
// HTML Analysis // | |
/////////////////// | |
// Find a class name in HTML | |
// Make sure to update SASS extensions at the same time as your HTML! (@extend .SEEK_THIS_CLASS) | |
class=.*[" ]SEEK_THIS_CLASS.*" | |
// Find a tag with a class name in HTML | |
div.*class=.*[" ]SEEK_THIS_CLASS.*" | |
////////////////////////// | |
// Media Query Analysis // | |
////////////////////////// | |
// Find @media queries containing main breakpoints | |
@media.*(480|768|1200).*?\) | |
// Find @media queries that do not contain main breakpoints | |
@media(.(?!480|768|1200))*?\) | |
////////////////////////// | |
// Find Front End TODOs // | |
////////////////////////// | |
// sublime text find in files include/exlude paths (not a regex) | |
*.coffee,*.js,*.html,*.scss,*.css,-*/lib/* | |
// exclude TODOs by subject. ex: TODO(?!\[ajax\-csrf\]) excludes TODO[ajax-csrf] | |
TODO(?!\[subject\]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment