• Login
Community
  • Login

Insertion of the leading zeros

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 5.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    AndyOldShoe
    last edited by Oct 28, 2017, 3:01 PM

    Hello.
    I’ve got a little misunderstanding. There is a text file with such kind of list:
    131_1.txt different symbols
    131_2.txt different symbols
    131_3.txt different symbols
    …
    131_10.txt different symbols
    …
    131_100.txt different symbols
    …
    131_1000.txt different symbols

    I have to insert leading zeros after prefics to get this kind of the list:
    131_0001.txt different symbols
    131_0002.txt different symbols
    131_0003.txt different symbols
    …
    131_0010.txt different symbols
    …
    131_0100.txt different symbols
    …
    131_1000.txt different symbols

    Is there an opportunity to perform it using Notepad++? I can find string “131_1.txt” with regular expressions, but I don’t know how to replace or just insert zeroes.
    I can do it manually with vertical blocks, of course, but it’s interesting to do it automatically )

    S 1 Reply Last reply Oct 28, 2017, 3:44 PM Reply Quote 0
    • S
      Scott Sumner @AndyOldShoe
      last edited by Oct 28, 2017, 3:44 PM

      @AndyOldShoe

      This thread will have information to help you in this task: https://notepad-plus-plus.org/community/topic/13988/find-replace-issues

      Since you have experience with regular expressions I will not do it for you, but will rather leave you to it! :-)

      1 Reply Last reply Reply Quote 1
      • A
        AndyOldShoe
        last edited by Oct 28, 2017, 4:47 PM

        Brilliantly, it works! Thank you so much)

        1 Reply Last reply Reply Quote 1
        3 out of 3
        • First post
          3/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors