Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of MyEclipse regular removal of line numbers?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the method of removing line numbers by MyEclipse regularization". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of MyEclipse regular removal of line numbers"?

Regular expression removes the line number of the code

As developers, we often copy some code from the Internet, sometimes the copied code is preceded by a line number, such as:

MyEclipse has its own find and replace function and supports regular expression substitution, which can be easily removed by using regular substitution.

Use the shortcut key "ctrl+F" to open the find and replace function of MyEclipse, as shown in the following figure:

In this way, all the line numbers in the code can be removed.

The regular expression that removes the line number: ^\ s *\ d +\.

In order to share one for you, for example, the code copied online is as follows:

1 2 3 4 5 New Document 6 7. 8 9

Does it bother you to have a line number?

There are two common ways to solve the problem, and we must all know how to use regularization.

Method 1:

Using the find and replace function of commonly used development tools, of course, you need to support regular ones, such as my commonly used text editor Notepad++.

Open find replace (ctrl+h), select regular mode, regular expression: ^\ s *\ d +\. As shown in the picture

This method is the same as the one at the top.

Method 2, if your development tool is not easy to use, you can download and use this regular testing tool

As shown in the figure:

Run is commands- > run

Thank you for your reading, the above is the content of "what is the method of MyEclipse regular removal of line numbers". After the study of this article, I believe you have a deeper understanding of what the method of MyEclipse regular removal of line numbers is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report