I want to search and replace a lot of numbers in the range 0-9 and add one to them, so they become in the range 1-10 instead.
for example: 0 3 5
would become: 1 4 6
In eclipse Find/Replace window I can match a number with ^([0-9]+)$
In the replace-field can I somehow add to the matched number $1?
/G
No, there isn't a way to specify a callback function/macro, which is what you would need in order to change the first group ($1), or any of the results, in such a way.
Maybe there's a plugin that will enable this, but I'm not currently aware of one.
As a work-around, you could perhaps use jEdit for this, which does allow you to apply a script to your results (although I've not yet tried it myself so not sure how well it works).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With