Community
    • Login

    How do I increase numbers by one

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    regexhtml encoding
    4 Posts 2 Posters 376 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.
    • dr ramaanandD
      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
        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
          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
            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors