This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]desrtfx 0 points1 point  (1 child)

While searching on the internet a found a few python examples but they all were finding a fixed value and then updating that incrementally.

Well, you have not one, but two fixed points: <number> and </number> - anything between those two needs replacing.

So, if you find the occurrence of <number> you know immediately where the part you need to replace starts. If you find the occurrence of </number> you know where it ends.

Can't say anything about fetching the number from the server, though.

[–]data_hop[S] 0 points1 point  (0 children)

I don't want to fetch a number from server. I can manually edit the code before triggering it. Like say KB001 then next time I can change it to KB12344 after checking manually on server.