Community

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

    mark and remove

    Help wanted · · · – – – · · ·
    4
    8
    220
    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.
    • Gulab Borkar
      Gulab Borkar last edited by

      hi guys i have list for example

      daniel1
      Marcni11
      dominik1
      majka1
      aadrian21
      Adam123
      in notpad when i mark 1 in list notpad mark all word have number 1 i will just mark
      word+1 mark and remove
      example list resualt

      daniel1
      dominik1
      majka1

      and tanks for help me sorry my english bad

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @Gulab Borkar last edited by

        @Gulab-Borkar said in mark and remove:

        hi guys i have list for example

        daniel1
        Marcni11
        dominik1
        majka1
        aadrian21
        Adam123
        in notpad when i mark 1 in list notpad mark all word have number 1 i will just mark
        word+1 mark and remove
        example list resualt

        daniel1
        dominik1
        majka1

        Is this what you are looking for.
        find what:\w+\d(?=\d+).*
        replace with:EMPTY-NOTHING-TO-ADD
        select regular expression

        This would delete all words which do have more than one digits in it

        and tanks for help me sorry my english bad

        Use an online translator. I would recommend https://www.deepl.com/
        if your language is already available but others like
        https://translate.google.com/ do get better and better as well.

        Gulab Borkar 1 Reply Last reply Reply Quote 2
        • Gulab Borkar
          Gulab Borkar @Ekopalypse last edited by

          @Ekopalypse

          Dear friend in this list i just want to copy and paste the words 1 have like admin1 and i don’t want Admin123 in the list just words with one number

          mylist:
          daniel1
          Marcni11
          dominik1
          majka1
          aadrian21
          Adam123

          I want the result to be like this

          daniel1
          dominik1
          majka1

          1 Reply Last reply Reply Quote 0
          • guy038
            guy038 last edited by guy038

            Hi, @gulab-borkar, @ekopalypse and All,

            I think that @ekopalypse, inadvertently, forgot to include the EOL characters of lines to delete ;-))

            So , here is my version :

            SEARCH ^[^\d\r\n]+\d{2,}\R

            REPLACE Leave EMPTY

            • Tick the Wrap around option, if necessary

            • Select the Regular expression search mode

            • Click once on the Replace All or several times on the Replace button


            Notes :

            • From beginning of lines ( ^ ), it looks for a greatest non-null range of chars, all different from a digit and EOL chars ( [^\d\r\n]+ )

            • Followed with, at least, two digits ( \d{2,} ) and the EOL characters of current line (\R )

            • As the Replacement zone is EMPTY, then these entire lines are deleted

            Best Regards,

            guy038

            P.S. :

            Fundamentally, this regex S/R deletes any line, ending with more than 1 digit !

            Gulab Borkar 1 Reply Last reply Reply Quote 1
            • Gulab Borkar
              Gulab Borkar @guy038 last edited by

              @guy038
              this not work for this list
              mateusz1
              polska1
              marcin
              123qwe
              qwerty123
              bnmqxztv123
              polska123
              bartek1
              kacper123
              lol123
              monika
              mateusz
              kacper1
              kamil123
              kamil1
              kasia1
              1q2w3e4r
              polska12
              haslo1
              myszka
              damian1
              justyna1
              marcin1
              attila6685
              piotrek
              agnieszka
              karolina1
              qwerty1
              bartek
              klaudia1
              1qaz2wsx
              karolina
              marek1
              misiaczek
              patryk1
              komputer1
              mamusia1
              samsung1
              dawid1
              kacper
              maciek1
              matrix
              patryk
              samsung
              michal
              misiek1
              piotrek1
              wojtek
              adrian
              agnieszka1
              haslo11
              karol1
              lolek123
              maciek
              michal1
              monika1
              natalia
              daniel
              dominik1
              haslo123
              pawel1
              qwerty12
              123qweasdaf
              1qazxsw2
              kasia
              kochanie1
              lukasz1
              master
              natalia1
              patrycja1
              paulina1
              weronika1
              bartek123
              dupa123
              kacper12
              lukasz
              maciek123
              mariusz
              martyna1
              q1w2e3r4
              adrian123
              asd123
              dawid123
              dawidek1
              jordan23
              wiktoria1
              1q2w3e
              adrian1
              barcelona
              komputer
              mariusz1
              michal123
              niunia
              pawel123
              tomek
              tomek1
              widzew1910
              wojtek1
              12qwaszx
              dragon
              ewelina1
              konrad
              misiek123
              poczta1
              1q2w3e4r5t
              aleksandra1
              damian
              dominika
              dorota
              kochanie

              and i will see result in output
              mateusz1
              polska1
              bartek1
              kacper1
              kamil1
              kasia1
              haslo1
              damian1
              justyna1
              marcin1
              karolina1
              qwerty1
              klaudia1
              marek1
              patryk1
              komputer1
              mamusia1
              samsung1
              dawid1
              maciek1
              misiek1
              piotrek1
              agnieszka1
              karol1
              michal1
              monika1
              dominik1
              pawel1
              kochanie1
              lukasz1
              master
              natalia1
              patrycja1
              paulina1
              weronika1
              martyna1
              dawidek1
              wiktoria1
              adrian1
              mariusz1
              tomek1
              wojtek1
              ewelina1
              poczta1

              i will find in list all word with 4 to 8charecter + number 1 just all word+1

              example:
              China1
              and not in my result example : 1China or china123 or ch1na1 only word full+ number 1

              1 Reply Last reply Reply Quote 0
              • guy038
                guy038 last edited by

                Hi, @gulab-borkar, @ekopalypse and All,

                Ah… OK ! You just want lines with true words, followed with the unique digit 1, at end of line. Even, the case haslo11 must not be in the output text !

                If so, use the following regex S/R :

                SEARCH (?i-s)^.+(?<!\u1)\R

                REPLACE Leave EMPTY

                Notes :

                • The first part (?i-s) means that the regex engine :

                  • Runs the search process in a insensitive way , (?i)

                  • Considers that any dot . matches a single standard character ( and not the EOL chars ! ) , (?-s)

                • Then, the part .+ matches all standard characters of each line, but ONLY IF …

                • The end of line is preceded with a letter, whatever its case, and the digit 1, due to the negative look-behind, which looks backward from the EOL location !

                You should get the expected text, below :

                mateusz1
                polska1
                bartek1
                kacper1
                kamil1
                kasia1
                haslo1
                damian1
                justyna1
                marcin1
                karolina1
                qwerty1
                klaudia1
                marek1
                patryk1
                komputer1
                mamusia1
                samsung1
                dawid1
                maciek1
                misiek1
                piotrek1
                agnieszka1
                karol1
                michal1
                monika1
                dominik1
                pawel1
                kochanie1
                lukasz1
                natalia1
                patrycja1
                paulina1
                weronika1
                martyna1
                dawidek1
                wiktoria1
                adrian1
                mariusz1
                tomek1
                wojtek1
                ewelina1
                poczta1
                aleksandra1
                

                BTW, in your output text, you wrongly added the line master and forgot the last correct line aleksandra1 ;-))

                Best Regards,

                guy038

                Sarah Duong Gulab Borkar 2 Replies Last reply Reply Quote 2
                • Sarah Duong
                  Sarah Duong @guy038 last edited by

                  @guy038 How to upload your similar results? Can you show me how to do that? I need to know to post a question with an example to get the results I want soon

                  1 Reply Last reply Reply Quote 0
                  • Gulab Borkar
                    Gulab Borkar @guy038 last edited by

                    @guy038

                    thanks

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