[Novalug] need grep help

Kevin Cole dc.loco@gmail.com
Fri Mar 16 16:06:13 EDT 2012


On Fri, Mar 16, 2012 at 16:12, James Ewing Cottrell 3rd <
JECottrell3@comcast.net> wrote:

>  Cleverness Kudos for combining the two RE's into one, but Performance
> Dings for not keeping them separare.
>
> For all comments, the ".*" part will have to be scanned unnecessarily.
>

Woopsie... Now you've got me wondering what made me add it.


> I still say that '^$|[ \t]#' is better, and more clear.
>

Only a programmer would find \t clearer than :space: ;-)

Besides...what happens when you want to add other types of comments? Bind
> files use ';'. C++ and others use '//'.
>

That thought has occurred, but 99% of my use case has been config files
that use #  where the ratio of real commments and deactivated options to
active lines is about 500 to 1, and python code.   Well, maybe 85%, as see
a fair amount of HTML / CSS / PHP / Javascript / SQL comments.  Still, my
main need has been filtering those config files that are really
documentation with a few live examples in them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20120316/0a266e3a/attachment.htm>


More information about the Novalug mailing list