Regex: Find four tabs, but then select the first { prior to the tabs -
i'm pretty close need rubular:
http://rubular.com/r/tazrj1h1z7
but, rather selecting whole block of lines indented 4 tabs, want match { appears before block.
basically, allow me search codebase find how many occurences of 4-tab blocks have, rather how many lines of 4-tab code.
/\t{4}.+/
.progressbar{ .progressbarrow { .progressbarcontainer { .progress { filter: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; border: #b9b9b9 1px solid; height:40px; } } } }
you can reverse question: find first {
followed line 4 (or more) leading tabs. this regex trick:
\{\s*\n\t{4,}
if whatever reason want match {
itself, can either put in group:
(\{)\s*\n\t{4,}
or use look-ahead make whole match {
:
\{(?=\s*\n\t{4,})
Comments
Post a Comment