-2

I have some kind of different strings in various files like

"a.x" "a.y" 

in a project in eclipse. Where "a. is common between all. I'm wondering is possible to search for "a.*" and replace with a.*

So basically it becomes

Before

"a.x" "a.y" 

After

a.x a.y 
4
  • Possible duplicate of Learning Regular Expressions Commented May 31, 2018 at 10:38
  • @Biffen: It's not a regex understanding, it's a question about how find/replace works in Eclipse and it's support of regex Commented May 31, 2018 at 10:39
  • If you have any regex that you have attempted so far, please add it to the question. It will help reduce the downvoting you are getting. Although I think the question is fine as it is Commented May 31, 2018 at 10:44
  • Use Search File for this see here. Select Regular Expression on both dialogs. Commented May 31, 2018 at 10:57

1 Answer 1

-1

You need to use the capture groups, I believe in Eclipse you can use $1 for the first capture group. So this should work:

Search: "a\.(.+)"

Replace: a.$1

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.