When applying for a soft patent or copyright, we often need to submit the number of lines of source code. If each page is opened, the workload for statistics is too large. Fortunately, the idea of laziness can also stimulate creativity. On the Internet, I really found a way to use it. I will share the following with you.
Press Ctrl + Shift + f (find in files) to check that regular expressions are supported, and enter the search content:
^: B * [^: B #/] +. * $
The above expression statistics can be: # The beginning and/or the beginning of the blank line are not included in the amount of code. If you only need to count the amount of code in the code file, you can select the file type, such as *. XML, *. resx .... Check only *. CS, *. C, *. H...
After searching, the last line is the number of lines of code.
I would like to thank this unknown netizen for his original article from Baidu Q &.
Http://zhidao.baidu.com/link? Url = _ dIAfUIzxEd8TYpJHWVZPBf4q-W5uX-YH _ 6c-bzgopugbnipmss6-1pkkmeelcplqzq3bg7ucvkue0rsmprvq