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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login