Community
    • Login

    erase exacly lines

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    17 Posts 7 Posters 1.3k 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.
    • Altevir GomesA
      Altevir Gomes
      last edited by

      preciso apagar tudo deixar apenas dos numeros pra frente, qual comando seria?
      I need to delete everything, leaving only the numbers in front, what command would that be?

      1bfd28a9-9cd3-47ab-8c06-927b800c22d0-image.png

      Terry RT 1 Reply Last reply Reply Quote 1
      • Terry RT
        Terry R @Altevir Gomes
        last edited by Terry R

        @Altevir-Gomes
        Please Read the post here.

        Providing an image is not good enough. Are the line numbers part of the data or from the application showing the data?

        By providing the data able to be copied you will have a better chance of getting a good answer.

        Terry

        PS I upvoted you so that you can provide links in posts

        Altevir GomesA 1 Reply Last reply Reply Quote 1
        • Altevir GomesA
          Altevir Gomes @Terry R
          last edited by

          @Terry-R

          Line 4: CC > 4218480664884222|04|23|810
          Line 31: CC > 4824251808439108|10|23|336
          Line 58: CC > 5489840940819897|02|27|390
          

          i want only delete all worlds before the numbers

          5489840940819897|02|27|390

          only this format, understand?

          Thomas KnoefelT 1 Reply Last reply Reply Quote 0
          • Thomas KnoefelT
            Thomas Knoefel @Altevir Gomes
            last edited by

            @Altevir-Gomes If i understand correctly to remove everything in front of the digits check this Regex expresion:

            Find what: .*?(\d{16}\|\d{2}\|\d{2}\|\d{3}).*
            Replace with: $1

            Altevir GomesA 3 Replies Last reply Reply Quote 1
            • Altevir GomesA
              Altevir Gomes @Thomas Knoefel
              last edited by

              @Thomas-Knoefel i can’t understand, please translate pt-br.

              EXAMPLE:

              Line 195: CC > 4984232072383368|10|21|904
              Line 222: CC > 4107490266557443|10|24|386
              Line 249: CC > 5232841057588036|11|23|830
              Line 276: CC > 4824251936976112|12|23|021
              Line 301: CC > 5502097671724563|03|29|479
              Line 326: CC > 4984427471168531|11|21|287
              Line 351: CC > 5502097748676291|11|27|742
              Line 376: CC > 5234210221782396|12|26|416
              Line 401: CC > 4392674069194918|08|29|845
              Line 426: CC > 6062824329262377|01|26|473
              

              I WANT:

              4392674069194918|08|29|845

              remove this =51ff0012-d055-4df2-8b77-569d569bdaf3-image.png

              1 Reply Last reply Reply Quote 0
              • Altevir GomesA
                Altevir Gomes @Thomas Knoefel
                last edited by

                @Thomas-Knoefel it worked thank you, please close the post

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

                  Hello, @altevir-gomes, @terry-r, @thomas-knoefel and All,

                  @altevir-gomes, I suspect that you get the data from the Notepad++ Search Results panel ! if so, I think that the correct regex S/R should be :

                  • SEARCH (?-si)^\tLine.+>\x20

                  • REPLACE Leave EMPTY


                  Now, if you previousy extract this data on a new tab and deleted the leading TAB character, this regex becomes :

                  • SEARCH (?-si)^Line.+>\x20

                  • REPLACE Leave EMPTY

                  And, of course, use the Regular expression search mode !

                  Best Regards,

                  guy038

                  1 Reply Last reply Reply Quote 2
                  • Altevir GomesA
                    Altevir Gomes @Thomas Knoefel
                    last edited by Altevir Gomes

                    @Thomas-Knoefel i have another question

                    EXAMPLE:

                    LIVE | 07934954409|carol123 - EMAIL: ericaveras@bol.com.br - #MaxCenter
                    LIVE | 31083380800|pizetta1 - EMAIL: isaias.pizetta@bol.com.br - #MaxCenter
                    LIVE | 45925437500|gel0473 - EMAIL: rogerdolar@bol.com.br - #MaxCenter
                    LIVE | 95304185072|saimon18 - EMAIL: dilcelene@bol.com.br - #MaxCenter
                    LIVE | 11578698820|r200700 - EMAIL: darsie@bol.com.br - #MaxCenter
                    LIVE | 04543429699|180808re - EMAIL: xavierprojetos@bol.com.br - #MaxCent

                    I WANT ONLY:

                    04543429699|180808re
                    11578698820|r200700
                    95304185072|saimon18
                    95304185072|saimon18
                    45925437500|gel0473

                    ID = have a default 11 numbers
                    PASS = random pass’s

                    ID/PASS

                    Alan KilbornA 1 Reply Last reply Reply Quote 0
                    • guy038G
                      guy038
                      last edited by guy038

                      Hi, @altevir-gomes, @terry-r, @thomas-knoefel and All,

                      I suppose that this regex S/R :

                      SEARCH (?-is).+(?<=\|\x20)(.+)(?=\x20-\x20EMAIL:).+

                      REPLACE \1

                      Should work, as you expect to !

                      BR

                      guy038

                      Altevir GomesA 2 Replies Last reply Reply Quote 2
                      • PeterJonesP
                        PeterJones @Altevir Gomes
                        last edited by PeterJones

                        @Altevir-Gomes said in erase exacly lines:

                        it worked thank you, please close the post

                        This forum doesn’t “close posts” or “mark posts as solved”. It’s for discussion, so people can keep replying with new ideas or tangential thoughts even after your original request has been solved.

                        —

                        Also, since no one has mentioned any of the following yet:

                        Useful References

                        • Please Read Before Posting
                        • Template for Search/Replace Questions
                        • Formatting Forum Posts
                        • Notepad++ Online User Manual: Searching/Regex
                        • FAQ: Where to find other regular expressions (regex) documentation
                        1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @Altevir Gomes
                          last edited by

                          @Altevir-Gomes :

                          And before you say this yet again:

                          i have another question

                          Please try and study what you’ve already been given along with the references provided, and try to solve your own problems of this sort. Sure, if you have trouble, post back here, but be prepared to show you have at least made an effort first.

                          1 Reply Last reply Reply Quote 1
                          • Altevir GomesA
                            Altevir Gomes @guy038
                            last edited by

                            @guy038 WORKED TOO, you are a genius, thx <3

                            i’m from brazil sorry for my bad english

                            1 Reply Last reply Reply Quote 2
                            • Altevir GomesA
                              Altevir Gomes @guy038
                              last edited by

                              @guy038 hey guy, please can help me again? i have other question

                              THIS:

                              Registro : 13
                              Itau S/A - Gold
                              Cartão : 5484740469100643
                              Validade : 04/2027
                              Cod. Segurança : 676
                              SENHA DO CARTÃO : 2572
                              Portador : Valdir Nogueira da Silva
                              CPF : 219.729.403-25
                              e-mail : valdirbm2013@yahoo.com
                              senha : bombeiro
                              endereço : Rua 60
                              número : 342
                              bairro : Jereissati II
                              cidade : Maracanaú
                              estado : CE
                              cep : 61901-240
                              data : 06/06/2020 10:03

                              I WANT ONLY THIS

                              5484740469100643|04|2027|676

                              Alan KilbornA 1 Reply Last reply Reply Quote 0
                              • Alan KilbornA
                                Alan Kilborn @Altevir Gomes
                                last edited by

                                @Altevir-Gomes said in erase exacly lines:

                                please can help me again?

                                What have you tried on your own first?
                                This isn’t a data transformation service where you just get free, no effort (expended by you) help, over and over again.

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

                                  Hi, @altevir-gomes, @terry-r, @thomas-knoefel, @alan-kilborn and All,

                                  For the last time, I’m going to give you the right regex S/R to use. But, frankly, you would better off spending some spare time to learn the basic regex features !

                                  Refer to the link below for further information :

                                  https://community.notepad-plus-plus.org/topic/15765/faq-where-to-find-regular-expressions-regex-documentation/1


                                  So, starting from your INPUT text :

                                  Registro : 13
                                  Itau S/A - Gold
                                  Cartão : 5484740469100643
                                  Validade : 04/2027
                                  Cod. Segurança : 676
                                  SENHA DO CARTÃO : 2572
                                  Portador : Valdir Nogueira da Silva
                                  CPF : 219.729.403-25
                                  e-mail : valdirbm2013@yahoo.com
                                  senha : bombeiro
                                  endereço : Rua 60
                                  número : 342
                                  bairro : Jereissati II
                                  cidade : Maracanaú
                                  estado : CE
                                  cep : 61901-240
                                  data : 06/06/2020 10:03
                                  
                                  

                                  If you use the following regex S/R :

                                  SEARCH (?-si)^Registro(?s:.+?)Cartão : (.+)\RValidade : (.+)/(.+)\RCod. Segurança : (.+)(?s:.+?)^data.+(\R\R)

                                  REPLACE \1|\2|\3|\4\5

                                  You should get your expected OUTPUT text :

                                  5484740469100643|04|2027|676
                                  
                                  

                                  Note that I suppose that each block of text is always separated with a line-break !


                                  Now, some quick hints about the search and replace regexes. I’ll use the free-spacing mode for better visibility

                                  
                                  SEARCH
                                  
                                  (?x-si) ^ Registro       (?s: .+? )  Cartão [ ]:[ ] (.+) \R   Validade [ ]:[ ] (.+) / (.+) \R  Cod \.[ ] Segurança[ ]:[ ] (.+) \R  (?s: .+? ) ^ data .+? ( \R\R )
                                            <---FIRST TWO lines ---->  <---- THIRD line ---->   <-------- FOURTH line -------->  <---------- FIFTH line ---------->  < OTHERS >   <-- LAST line -->
                                  
                                  
                                  REPLACE
                                  
                                  \1|\2|\3|\4\5
                                  
                                  \1 represents the 'Card' number AFTER the 'Cartão' string
                                  
                                  \2 and \3 represent the 'Month' and the 'Year' numbers AFTER the 'Validade' string
                                  
                                  \4 represent the 'Security' number AFTER the 'Cod. Segurança' string
                                  
                                  \5 represents the TWO line-breaks at the END ( the one after the LAST line and the EMPTY NEXT one )
                                  
                                  

                                  Best Regards,

                                  guy038

                                  Altevir GomesA 1 Reply Last reply Reply Quote 1
                                  • Altevir GomesA
                                    Altevir Gomes @guy038
                                    last edited by

                                    @guy038 not work to me, but thx.

                                    its very hard to learn REGEX i don’t speak english.

                                    NippurDeLagashN 1 Reply Last reply Reply Quote 0
                                    • NippurDeLagashN
                                      NippurDeLagash @Altevir Gomes
                                      last edited by

                                      @Altevir-Gomes If you feel your English in not good enough, you can still learn Expressões Regulares (Em Portuguese do Brasil)" studying the following book:

                                      https://www.piazinho.com.br/#download

                                      The book dedicates a few pages to Notepad++ in chapter 6.

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