BraveNewMath
BraveNewMath

Reputation: 8333

in VS, how do you use regex find/replace but increment numeric value

given that I have an xml tag like this A30001

I was able to get a regex going which got me the numeric part - 30001

like this:

3{[0-9]^4}\<

I can then get the value back by replacing the tagged experession like so

3\1<

but need to know if visual studio's regex engine will let me replace it with 30002

thanks

Upvotes: 4

Views: 1266

Answers (1)

BraveNewMath
BraveNewMath

Reputation: 8333

the answer is no. After scouring the web, I ended up doing manual replace with the next higher number.

Upvotes: 3

Related Questions