How to select all the text in notepad without "lines of code"
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?
PeterJones last edited by PeterJones
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_textby 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.
@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 it
PeterJones last edited by
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.
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 Kilborn last edited by
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.
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?
PeterJones 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.
I understand. Thank you very mutch again!