How to quickly calculate the number of source code lines when reporting software copyrights

Source: Internet
Author: User

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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.