Community
    • Login

    Combining content of files?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    16 Posts 5 Posters 735 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.
    • Sarah DuongS
      Sarah Duong @PeterJones
      last edited by Sarah Duong

      @PeterJones Thanks for answering. Sorry for the late reply.
      Let me ask how to find the lines that contain the characters “Look” and “Say”. These 2 words are located anywhere in each line.
      One more question: Which characters should I use to search for a line of 5 or more characters? For a long time I used " (?: [a-zA-Z0-9.!? * ":; + - &% $ # @ × () ~` | ÷ / |] {5,}) " covers everything but this is still not enough.Is there any other way, simple but comprehensive all the characters? I pray, and hope you understand what I said.

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

        Hello, @sarah-duong and All,

        • Regarding your first question, use, either :

          • (?-is)^.*(Look.+Say|Say.+Look).*     OR     (?i-s)^.*(Look.+Say|Say.+Look).* for a insensitive to case search

        • Regarding your second question, why not this simple syntax, with the dot regex : symbol ( . ) which represents any single standard character ( NOT line-break chars )

          • (?-s)^(.{5,})     Note that all line contents are stored as group 1 which may be used, in replacement, with one of the syntaxes : \1, $1 or ${1}

        Best Regards,

        guy038

        Sarah DuongS 1 Reply Last reply Reply Quote 2
        • Sarah DuongS
          Sarah Duong @guy038
          last edited by Sarah Duong

          @guy038 You seem to be misunderstanding me. Probably due to my incomplete question. The format of each line is as follows: For example: “(a-zA-Z0-9). Look | (a-z0-9) .Say” This example is still missing. I meant to find this format. “Look” is always to the left of the "| and vice versa “Say” on the right. Do you understand?
          In question 2, I want to find the format Emai:Pass , (Pass is any character, 5 or more characters). I tried applying: ^. +: (? - s) ^ (. {5,}), but … you probably know the result. 🥴 Sorry

          Sarah DuongS 1 Reply Last reply Reply Quote 0
          • Sarah DuongS
            Sarah Duong @Sarah Duong
            last edited by

            It was really difficult when my English level was too short. Hopefully, people will imagine how rich to understand how Google is translating. Unfortunately

            EkopalypseE 1 Reply Last reply Reply Quote 0
            • EkopalypseE
              Ekopalypse @Sarah Duong
              last edited by

              Hello, @Sarah-Duong

              excuse me, but your new posts are even more confusing.
              My mother tongue is not English either and I often use an online translator to express myself here.
              What I noticed is that the better and more precise I express myself in my mother tongue, the better the translator can translate this reasonably.
              And to the question itself, if example data can be provided, where to say exactly what you have and what you expect, then these are almost even more helpful than the explanations.

              Sarah DuongS jakimaJ 2 Replies Last reply Reply Quote 2
              • guy038G
                guy038
                last edited by guy038

                Hi, @sarah-duong, @ekopalypse and All,

                Ah… OK ! So, regarding your second question, I would say :

                SEARCH ^.+:.{5,}

                Note that I did not place any group (....) in my regexes because we don’t know what you really want to do :

                • To search for some text

                • To mark some text

                • To bookmark some text

                • To replace some text with nothing or other text

                and which part of current line are you looking at :

                • The part before the colon :

                • The part after the colon :

                • All the line contents without its like-break characters

                • All the line contents with its like-break chars

                So, in summary, be as specific as possible about your needs. Once we have the different elements, it will be easy to to fine-tune the regex ;-))


                Now, about your first question, it’s even worse :-(

                First, I would say that the regex, given in my first post, does find your line (a-zA-Z0-9). Look | (a-z0-9) .Say ?!

                Now you said, previously :

                These 2 words are located anywhere in each line.

                But in your last post you say :

                “Look” is always to the left of the "| and vice versa “Say” on the right.

                There is a contradiction !


                A few questions in a jumble:

                • Do you mean that you’re looking for literal strings (a-zA-Z0-9). and (a-z0-9) . ?

                • A dot symbol . is separated from the word Look by a space char but the second dot is close to the word Say. Is it normal ?

                • Do you search for the exact words Look and Say or are the forms LOOK, say, LooK or sAy correct, too ?

                BR

                guy038

                1 Reply Last reply Reply Quote 4
                • Sarah DuongS
                  Sarah Duong @Ekopalypse
                  last edited by

                  @Ekopalypse sorry. I using phone. Can you do that on your phone?

                  EkopalypseE 1 Reply Last reply Reply Quote 0
                  • EkopalypseE
                    Ekopalypse @Sarah Duong
                    last edited by Ekopalypse

                    @Sarah-Duong

                    There’s no need to apologise, you’ve done nothing wrong.
                    I would be more than surprised if there were no translators
                    in the respective app stores and after all, every mobile phone
                    has a browser, so you can definitely access an online translator, can’t you?

                    Sarah DuongS 1 Reply Last reply Reply Quote 1
                    • jakimaJ
                      jakima @Ekopalypse
                      last edited by

                      @Ekopalypse
                      what? that’s translated text? wow, i never would have guessed that.

                      EkopalypseE 1 Reply Last reply Reply Quote 1
                      • EkopalypseE
                        Ekopalypse @jakima
                        last edited by

                        Hello, @jakima,
                        yes, online translators get better and better.
                        I use one called DeepL.
                        DeepL does not offer as many languages as Google yet, but the results are better as far as I can tell.

                        e68c93b2-53d0-49d6-b7b5-d653d401e761-image.png

                        Sarah DuongS 2 Replies Last reply Reply Quote 1
                        • Sarah DuongS
                          Sarah Duong @Ekopalypse
                          last edited by

                          @Ekopalypse and that is what google translated. I just did the copy and post work up here. I also do not understand why after using google translate and copy posted here, then I went back to read and found that I wrote so much wrong, and could not translate.

                          1 Reply Last reply Reply Quote 0
                          • Sarah DuongS
                            Sarah Duong @Ekopalypse
                            last edited by Sarah Duong

                            @Ekopalypse ok, thanks for share it. I will try using it. Hope it will bring better results. Ah let me ask, if I post a topic in the local language here, can you understand it through the automatic translation program? However, I noticed one thing: for example, I wrote a text: Myname12;$& then when translated into English, the text will be completely different. It will display as Myname12; $ &. It has extra spacing between special characters. My local language has accents, which leads to some character encoding

                            1 Reply Last reply Reply Quote 0
                            • Sarah DuongS
                              Sarah Duong @Ekopalypse
                              last edited by

                              @Ekopalypse It seems that your site Deepl, it has surrendered to my language. Vietnamese

                              EkopalypseE 1 Reply Last reply Reply Quote 0
                              • EkopalypseE
                                Ekopalypse @Sarah Duong
                                last edited by Ekopalypse

                                @Sarah-Duong

                                Yes, as I said, DeepL does not support as many languages as Google, Microsoft etc… yet.
                                In my opinion, the secret of a good translation is to be as accurate as possible in your native language.
                                Furthermore, I proceed in such a way that I check whether the translated text can be meaningfully retranslated.
                                If so, then it will be understandable, at least I hope so.
                                Example data should NEVER be translated, otherwise exactly what you have described can happen.

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