Let us say I have a text like so below:
AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn) AC(nn)
Now I want to replace the nn
with numbers like so
AC(0) AC(1) AC(2) AC(3) AC(4) AC(5) AC(6) AC(7) AC(8) AC(9) AC(10)
I used M-x replace-regexp nn RET \# RET
to accomplish this.
Questions:
- I want to start the replacement number to start from
1
rather than from0
. Or rather start from a specified number say25
. How should I modify the above command? - How to replace
nn
with digits like001
,002
....998
,999
etc - I mean with leading zeros