In Eclipse Find / Replace-field, can I change the result matched by regex $ 1?

I want to search and replace many numbers in the range 0-9 and add them to them, so they become in the range 1-10 instead.

e.g. 0 3 5

becomes: 1 4 6

In the eclipse search / replace window, I can match the number with ^ ([0-9] +) $

In the replace field, can I somehow add to the matching number $ 1?

/ G

+3
source share
1 answer

No, there is no way to specify a callback / macro function that you need to change the first group ($ 1) or any of the results this way.


Maybe there is a plugin that will enable this, but I currently don't know about it.


jEdit, script ( , , ).

+3

Source: https://habr.com/ru/post/1703948/


All Articles