• Login
Community
  • Login

I want to copy only the text without the codes

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
14 Posts 3 Posters 270 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.
  • M
    moath eledwan
    last edited by Mar 20, 2025, 7:52 PM

    I have a lot of these texts and I want to extract them and return them. How can that be done?
    example
    version=“1”><LSTag Tooltip=“MovementSpeed”>Movement Speed</LSTag>: [1]/[2]</content>

    This is the text :- Untitled.png MovementSpeed

    Please help

    T 1 Reply Last reply Mar 20, 2025, 8:09 PM Reply Quote 0
    • T
      Terry R @moath eledwan
      last edited by Terry R Mar 20, 2025, 8:18 PM Mar 20, 2025, 8:09 PM

      @moath-eledwan said in I want to copy only the text without the codes:

      I have a lot of these texts and I want to extract them and return them

      You haven’t explained yourself properly. You show an image of something but don’t tell us exactly what you want extracted. Please read our FAQ post here on how to properly show what you want.

      Terry

      You say without codes, they could include the &lt; and &gt; in the actual text.

      M 1 Reply Last reply Mar 20, 2025, 8:29 PM Reply Quote 0
      • M
        moath eledwan @Terry R
        last edited by Mar 20, 2025, 8:29 PM

        @Terry-R

        I explained but it seemed like an error had occurred. I apologize for that.
        What I want is to copy all the text only without the symbols. There are more than 4000 lines
        Texts are not always inside codes, but some of them contain codes and affect the file when it is saved in another language, for example

        this original line
        <LSTag Tooltip=“MovementSpeed”>Movement Speed</LSTag>: [1]/[2]

        This line when modified in another language

        [2]/[lt;/LSTag>: [1<LSTag Tooltip=“MovementSpeed”>

        So the xml file never worked

        Do you have a way to copy all the texts to translate them, and when you return them, the original format of the file remains as it is?

        T 1 Reply Last reply Mar 20, 2025, 8:39 PM Reply Quote 0
        • T
          Terry R @moath eledwan
          last edited by Mar 20, 2025, 8:39 PM

          @moath-eledwan said in I want to copy only the text without the codes:

          Do you have a way to copy all the texts to translate them, and when you return them, the original format of the file remains as it is?

          Extracting the text is possible, but as you want to return them, that complicates matters considerably as you need to insert a placeholder for each extracted text so you can return the “translated text” (whatever that really means) to the correct line. The placeholder might be just the line number which can be inserted at the start of every line for both copies.

          So the concept might be to have 2 copies of the file. In one you would delete all the “codes” so you could “translate”. Once translated you could look to combining the 2 copies so you could shift the codes back around the “translated” text.

          As I say, this is only a first draft of a solution. I still think your request needs explaining some more. Remember the more detail you can provide the more likely you will get a good solution.

          Terry

          M 1 Reply Last reply Mar 20, 2025, 9:18 PM Reply Quote 0
          • M
            moath eledwan @Terry R
            last edited by Mar 20, 2025, 9:18 PM

            @Terry-R
            Thanks for your reply
            When editing and translating texts, they are fine, but when pasted into the editor, the codes move and their formatting changes,

            the codes become:

            <i>Address me by my title, Minthara. Grand Duke Ravengard.</i>

            To this

            ;lt;/i&gt&.ﺩﺭﺎﺠﻨﻴﻓﺍﺭ ﺮﺒﻛﻷﺍ ﻕﻭﺪﻟﺍ .ﺍﺭﺎﺜﻨﻴﻣ ﻲﺒﻘﻠﺑ ﻲﻨﺒﻃﺎﺧ;lt;i&gt&

            T M 2 Replies Last reply Mar 20, 2025, 9:27 PM Reply Quote 0
            • T
              Terry R @moath eledwan
              last edited by Terry R Mar 20, 2025, 9:30 PM Mar 20, 2025, 9:27 PM

              @moath-eledwan

              Sorry but it’s still difficult to understand what you are trying to show.

              I can see that the translated text appears to be a right to left language. So the &gt; and &lt; are essentially the > and < characters that were in the original text. I would say that if you don’t want these codes to “move” (appear differently) then you need to check the translator program and see if it can ignore those codes.

              Terry

              PS I’m a moderator and I see you just posted the same post a second time. It appears to be exactly the same so I won’t release it. Bear in mind that as you are a new account and we place restrictions on accounts like yours to prevent spam, just wait until the post is released. You would have been advised this when setting up your account.

              1 Reply Last reply Reply Quote 1
              • M
                moath eledwan @moath eledwan
                last edited by Mar 21, 2025, 6:36 AM

                Sorry but it’s still difficult to understand what you are trying to show.

                I can see that the translated text appears to be a right to left language. So the &gt; and &lt; are essentially the > and < characters that were in the original text. I would say that if you don’t want these codes to “move” (appear differently) then you need to check the translator program and see if it can ignore those codes.

                Terry

                PS I’m a moderator and I see you just posted the same post a second time. It appears to be exactly the same so I won’t release it. Bear in mind that as you are a new account and we place restrictions on accounts like yours to prevent spam, just wait until the post is released. You would have been advised this when setting up your account.

                I am new and don’t know how to use this site. I hope you will be patient with me and thank you for your responses

                Now, after hours of trying, I have almost discovered the thing that solves my problem

                When I added this code, I found it on your website (?<=>)[^<]*(?=</) and it misleads the entire text into MARK ALL. I wondered if there was code like this that would mislead and copy only texts without… &lt;I&gt; &lt;/i&gt; &lt; &gt; &lt;br&gt;

                T 1 Reply Last reply Mar 21, 2025, 7:38 AM Reply Quote 2
                • T
                  Terry R @moath eledwan
                  last edited by Mar 21, 2025, 7:38 AM

                  @moath-eledwan

                  As I mentioned in an earlier post, I think using 2 copies of the file is the way forward. Both copies would have the line numbers at the start of all lines in both copies.

                  For the second copy of file, you would remove all code including the &lt; etc. This would likely take 2 regular expressions. The first would remove the code at the start of the line and the </content> at the end. The second would remove the remaining code as per your list, &lt; etc.

                  You should now have ONLY the text you want to translate. Once the text is translated you would need the line numbers still on each line. It wouldn’t matter if they were at the front or rear of the line.

                  The two copies would be combined and sorted so the 2 versions of the lines were together. Moving the code that was removed from the start and the end of the line is easy. However adding back in the codes you mentioned such as &lt; is probably best done manually as there would be no reference between the two lines since one is left to right and the other right to left.

                  I hope you can understand all these steps as I suspect english is not your first language.

                  Terry

                  PS From now on your posts should release immediately

                  M 1 Reply Last reply Mar 21, 2025, 9:31 PM Reply Quote 1
                  • M
                    moath eledwan @Terry R
                    last edited by Mar 21, 2025, 9:31 PM

                    @Terry-R Thank you again

                    Is there a way to hide all icons from the editor and show only the texts?

                    example
                    After scoring a <LSTag Tooltip=“CriticalHit”>Critical Hit</LSTag>, use the <LSTag Type=“ActionResource” Tooltip=“BonusActionPoint”>Bonus Action</LSTag> To make an additional attack.
                    Example 2

                    After scoring a critical hit, use your bonus action to make an additional attack.

                    Then restore it by pasting it and putting the codes back in place?

                    I think this is the last solution before I give up

                    T 1 Reply Last reply Mar 22, 2025, 5:49 AM Reply Quote 0
                    • T
                      Terry R @moath eledwan
                      last edited by Mar 22, 2025, 5:49 AM

                      @moath-eledwan said in I want to copy only the text without the codes:

                      Then restore it by pasting it and putting the codes back in place?

                      As I said in the previous post these codes can be removed by regular expression but because you translate the text they cannot be restored by regular expression. Worse still is that your example of translated text shows it as a right to left language, the reverse of the original text…

                      This is my personal belief. Other members might provide a solution to this final puzzle but I only see it as a manual process.

                      Terry

                      M 2 Replies Last reply Mar 22, 2025, 6:41 AM Reply Quote 1
                      • M
                        moath eledwan @Terry R
                        last edited by Mar 22, 2025, 6:41 AM

                        @Terry-R

                        Yes, the original translated text contains no errors
                        example

                        &lt;i&gt;هجوم.&lt;/i&gt;</content>
                        

                        However, when the direction of the translated text is reversed, the entire html tags are also reversed, so it becomes like this

                        example

                        <lt;/i&gt;</content&.ﻡﻮﺠﻫ;lt;i&gt&
                        

                        The text becomes strange and the tags merge into each other

                        1 Reply Last reply Reply Quote 0
                        • M
                          moath eledwan @Terry R
                          last edited by Mar 22, 2025, 7:53 AM

                          @Terry-R

                          A strange thing has happened in Word. The modified text is now correct, but it is not displayed in Notepad in the same way. Is there a solution to

                          word txt :
                          this?Untitled.png

                          M 1 Reply Last reply Mar 22, 2025, 3:17 PM Reply Quote 0
                          • M
                            Mark Olson @moath eledwan
                            last edited by Mar 22, 2025, 3:17 PM

                            @moath-eledwan said in I want to copy only the text without the codes:

                            A strange thing has happened in Word.

                            You should know by now that this forum is not the appropriate place to discuss issues with software other than Notepad++.

                            M 1 Reply Last reply Mar 22, 2025, 3:31 PM Reply Quote 1
                            • M
                              moath eledwan @Mark Olson
                              last edited by Mar 22, 2025, 3:31 PM

                              @Mark-Olson Thank you for the warning

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