Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Change a series of numbers when they start with 2

    Help wanted · · · – – – · · ·
    2
    7
    102
    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.
    • massimo la terra
      massimo la terra last edited by

      I would like to open a file, Notepad ++,
      When the series of numbers begins with 2, it takes into account the next 6 digits
      example original txt
      2230090048707,2
      2916220064167,2
      2031270035247,2
      2030330087752,2
      Final results
      230090,2
      916220,2
      031270,2
      030330,2

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @massimo la terra last edited by

        @massimo-la-terra

        Try:

        Find what box: 2(\d{6})\d*
        Replace with box: \1
        Wrap around checkbox: ticked
        Search mode radiobutton: Regular expression
        Press the Replace All button

        Alan Kilborn 1 Reply Last reply Reply Quote 2
        • Alan Kilborn
          Alan Kilborn @Alan Kilborn last edited by

          Ach, somehow missed copying the ^.

          Find-what expression should be ^2(\d{6})\d*

          massimo la terra 1 Reply Last reply Reply Quote 2
          • massimo la terra
            massimo la terra last edited by

            it works perfectly, can I turn it into a rule?

            1 Reply Last reply Reply Quote 0
            • massimo la terra
              massimo la terra @Alan Kilborn last edited by

              @Alan-Kilborn Cattura.PNG Cattura2.PNG
              In the second line there is the problem

              Alan Kilborn 1 Reply Last reply Reply Quote 0
              • Alan Kilborn
                Alan Kilborn @massimo la terra last edited by

                @massimo-la-terra

                In the second line there is the problem

                See if you can figure out where your original specification went wrong.
                Then see if you can figure out which part of the solution I gave you needs to change to make your new data work.

                can I turn it into a rule?

                If you mean to make a macro out of it, then the answer is yes. See the Macro menu for how to record and save a macro.

                1 Reply Last reply Reply Quote 2
                • massimo la terra
                  massimo la terra last edited by

                  ok grazie ;-)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors