Community
    • Login

    How to select all the text in notepad without "lines of code"

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    9 Posts 3 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.
    • PelagiusP
      Pelagius
      last edited by

      Gentlemen and ladies, I have a question - I do not understand Notepad at all and therefore I ran into a problem: I need to translate from one language to another, without affecting the lines of code, namely the content part. Can I somehow highlight only her?

      Just in case, I’ll explain (I just don’t understand this at all and therefore I’m afraid to say too incomprehensibly) - there is a blue text (code) and black (the content itself) - how do I select only black text?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Pelagius
        last edited by PeterJones

        @pelagius ,

        It will be much easier to understand what you want if you give us examples – click the </> button when you are editing your reply, which will insert

        ```
        code_text
        ```
        

        into the reply you are creating, then replace the code_text by selecting it and pasting in your actual example data.

        But that will not show us “blue” and “black” text (whatever that is supposed to mean), so you might also need to use Alt+PrintScreen to take a screen capture of Notepad++ showing the “blue” and “black”, and then Ctrl+V to paste that image into your reply as well.

        Until you do this, we cannot help you.

        PelagiusP 1 Reply Last reply Reply Quote 0
        • PelagiusP
          Pelagius @PeterJones
          last edited by

          @peterjones Thank you for your feedback.
          I have a file where there are lines of code between which there is black text. I will translate the black text from English to another language, but I do not need to touch the blue one. And I want to immediately highlight only the text without any program content, I don’t know how else to put itKH60Y5H97lo.jpg

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Pelagius
            last edited by

            @pelagius ,

            I don’t know how else to put it

            The image was helpful. “I want to highlight the value of the tags and not the tags themselves”

            The simplest way, if you really just want to highlight the next tag’s contents, is to search for FIND = (?<=>)[^<]*(?=</) with SEARCH MODE = regular expression. Once you do that first search, then each FIND NEXT (or F3) will move you to the next contents of a tag.

            89d6c1b6-ffa0-4fc2-b20a-fd4f9113dc48-image.png

            PelagiusP 1 Reply Last reply Reply Quote 2
            • PelagiusP
              Pelagius @PeterJones
              last edited by

              @peterjones said in How to select all the text in notepad without "lines of code":

              SEARCH MODE = regular expression

              Yes! Thank you very much, this is the way that I needed.

              Is there a way not just to find and follow separately, but also to highlight all the tag values at the same time, without the tags themselves?

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

                @pelagius said in How to select all the text in notepad without "lines of code":

                but also to highlight all the tag values at the same time

                Yes, move over to the Mark tab and it will do just that when you Mark All.

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

                  @alan-kilborn
                  You are just my savior! Thank you very much! Let me ask you one last question
                  And you can do the following: I need to copy all these tag descriptions, translate them into another language and then replace all the English tagged text with a translation. I found a button to copy all the marked text, but you can somehow try to replace it/highlight it not by marking the notepad itself, but as if I did it with the mouse myself. I just have a program that translates all the text highlighted with the cursor into the desired language.
                  Is there a way to implement this?

                  PeterJonesP 1 Reply Last reply Reply Quote 0
                  • PeterJonesP
                    PeterJones @Pelagius
                    last edited by

                    Inside Notepad++, what we’ve given you is pretty close to the best it will be able to do.

                    What you have is truly a programming task, not a simple text-editor task, to make it as “plug-and-play” as you seem to want it.

                    If I had your problem, instead of trying to work within the bounds of a text editor, which is made for editing text, not extracting small snippets throughout a document and performing an external action on those individual pieces, I would write a script in my favorite programming language using an XML parsing language that would parse the XML, extract the values, send the values to a translator, and then put the translated values back into the XML and save back to the file. (There would be a way to merge the two techniques, in that Notepad++ has a PythonScript plugin, so you could write a script in the python language that parsed the XML inside the active file, and sent it to the translation API.)

                    Or I would look for a “open source XML translator tool” via my favorite search engine.

                    PelagiusP 1 Reply Last reply Reply Quote 2
                    • PelagiusP
                      Pelagius @PeterJones
                      last edited by

                      @peterjones
                      I understand. Thank you very mutch again!

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