Replacing a number with line number in text
-
simply i have a 340 link in text file each one in each line
for example
youtubecom/1
youtubecom/1
youtubecom/1
youtubecom/1
youtubecom/1
youtubecom/1
i want to replace the number (1) with the line number
like this…
youtubecom/1
youtubecom/2
youtubecom/3
youtubecom/4
youtubecom/5
youtubecom/6
thx -
@yosef-ymj Hi. I suggest you learn to use
Edit -> Column Editor
(Alt+c) to insert a column of ascending numbers.Then, learn to use Alt+MouseMovement to select rectangles, and gain skill with rectangular cut/copy/paste operations.
When working with rectangles, these are also helpful:
- Shift+Alt+ArrowKey to adjust dimension
- Shift+Alt+LeftMouseClick to specify opposite corner of a rectangle whose other corner is current caret position
If your data is as uniform as shown, a sequence using the above operations will do what you want, although you may need to handle 1, 2 and 3 digit sections separately.
To review some creative solutions to rectangular text problems, use the magnifier icon and search this site for terms like “column editor rectangle paste”.
Drop a follow-up comment to indicate whether you succeeded.