Solve the problem of having a row number (Regular Expression to remove the code row number)

Source: Internet
Author: User

For exampleCodeAs follows:

 

1. < Html >
2.
3. < Head >
4.
5. < Title > New Document </ Title >
6.
7. < Meta Name = "Generator" Content = "Editplus" >
......
263. </ Body >
264.
265. </ Html >

 

 

Is it annoying to have a row number?

I often have two solutions. You must know that regular expressions are used.

Method 1:

To use the search and replacement functions of common development tools, you must support regular expressions, such as my commonly used text editor notepad ++.

Open Search replacement (CTRL + H), select regular mode, regular expression: ^ \ s * \ D + \.

 

Method 2: If your development tool is not easy to use, you can download and use this regular expression testing tool.

Http://cid-6adab3222e64b22c.office.live.com/self.aspx/.Public/%e8%bd%af%e4%bb%b6/RegexTester.rar

Run commands-> RUN

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.