Find and replace shortcuts in eclipse

Source: Internet
Author: User

Problem: Eclipse deletes hollow lines in the project file

Solution:

1. Open the source code editor.

2. Use the shortcut key Ctrl + F. Be sure to select Regular Expressions (Regular Expression )!!!

3. In the find input box, enter ^ \ s * \ n.

3. The value of the Replace with input box is null.

4. Select "Regular Expressions" in options"

5. Click replace all.

6. OK!

Common Regular Expression

Remove/**/(eclipse)/\ * (. | [\ r \ n]) *? \*/

Remove // (eclipse) //. * $

Remove import (eclipse) import. * $

Remove empty line (eclipse) ^ \ s * \ n

Remove empty row (UE) % [^ t] ++ ^ P

Set

Replace with <C: Out value =/"/$/{Af. Map. $1/}/"/>

^ Hello starts with "hello ".

Hello $ ends with Hello

Match the string ending with </title> :.*? </Title>

Match a string starting with <title>: <title> .*

Match a string starting with <title> </title>: <title> .*? </Title>

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.