-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 
Biffen
  • 6,249
  • 6
  • 28
  • 36
sam
  • 1
  • Possible duplicate of [Learning Regular Expressions](https://stackoverflow.com/questions/4736/learning-regular-expressions) – Biffen May 31 '18 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 – musefan May 31 '18 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 – musefan May 31 '18 at 10:44
  • Use Search File for this see [here](https://stackoverflow.com/q/3426049/2670892). Select Regular Expression on both dialogs. – greg-449 May 31 '18 at 10:57

1 Answers1

-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

musefan
  • 47,875
  • 21
  • 135
  • 185