Community
    • Login

    How do I increase numbers by one

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    regexhtml encoding
    4 Posts 2 Posters 1.4k Views 2 Watching
    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.
    • dr ramaanandD Offline
      dr ramaanand
      last edited by dr ramaanand

      How do I increase numbers by one for this set of numbers? :-

      <sup>[0]</sup>
      <sup>[1]</sup>
      <sup>[2]</sup>
      <sup>[3]</sup>
      <sup>[4]</sup>
      <sup>[5]</sup>
      <sup>[6]</sup>
      <sup>[7[</sup>
      <sup>[8]</sup>
      <sup>[9]</sup>
      <sup>[10]</sup>
      <sup>[11]</sup>
      

      The output should be:-

      <sup>[1]</sup>
      <sup>[2]</sup>
      <sup>[3]</sup>
      <sup>[4]</sup>
      <sup>[5]</sup>
      <sup>[6]</sup>
      <sup>[7[</sup>
      <sup>[8]</sup>
      <sup>[9]</sup>
      <sup>[10]</sup>
      <sup>[11]</sup>
      <sup>[12]</sup>
      
      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @dr ramaanand
        last edited by PeterJones

        @dr-ramaanand ,

        https://community.notepad-plus-plus.org/topic/23170/faq-can-i-do-a-mathematical-replacement

        You’ve been here long enough to know to check the FAQs. “ADD A VALUE TO EACH MATCH” is literally the first example for the PythonScript solutions in that FAQ.

        dr ramaanandD 1 Reply Last reply Reply Quote 0
        • dr ramaanandD Offline
          dr ramaanand @PeterJones
          last edited by dr ramaanand

          @PeterJones Okay, thank you.
          I think this will work for me:-
          REPLACE WITH A SIMPLE COUNTER (I.E., RENUMBERING)
          Plugins > Columns++ > Search…
          Find what : <sup>[(\d+)
          Replace with : <sup>[(?=match)
          I will try it tomorrow
          For those who arrive at this webpage by searching online, let me tell you that I am expecting a result like this:-

          <sup>[1]</sup>
          <sup>[2]</sup>
          <sup>[3]</sup>
          <sup>[4]</sup>
          <sup>[5]</sup>
          <sup>[6]</sup>
          <sup>[7[</sup>
          <sup>[8]</sup>
          <sup>[9]</sup>
          <sup>[10]</sup>
          <sup>[11]</sup>
          <sup>[12]</sup>
          
          dr ramaanandD 1 Reply Last reply Reply Quote 0
          • dr ramaanandD Offline
            dr ramaanand @dr ramaanand
            last edited by

            @PeterJones I was finally able to increase the numbers by one, using the methods you elucidated at, “How to install and run a script in Python Script”. Thanks a lot!

            1 Reply Last reply Reply Quote 1

            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors