3

I have numbers like 32,33,33.1,33.2,34,34.1,35,35.1,35.2,35.3,35.4,36 and so on. Now is it possible that if I will change the number 32 to 52, then all respective numbers will also change like 52,53,53.1,53.2,54,54.1,55,55.1,55.2,55.3,55.4,56 may be using regexp pattern or anything.

1 Answer 1

1

As far as I know, Regular Expressions cannot perform mathematical functions on the values which they find. However, for finding numbers which begin with '3' and making them start with '5', this Regex will suffice:

Find:

3([0-9]*\.*[0-9]*)

Replace:

5\1

If you want to carry on into the 40s, 50s, etc, then the first number in each of these expressions will need to be modified.

2
  • It is difficult to do this using Regexp in notepad++. So I have done that in java. Sometimes coding is better.. Oct 9, 2013 at 10:58
  • @user1788115, if you already knew how to do this, why didn't you just do this?
    – Dave
    Oct 25, 2013 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .