• regular expression - why don't the last words change their order?

    14
    0 Votes
    14 Posts
    634 Views
    EkopalypseE

    @Robin-Cruise

    View->Show Symbol->Show All Characters

    But as @Terry-R wrote, it seems that you are changing your requirements and this is something that does not work well with regexes.

    If there is a language barrier here, try using an online translator and posting in your native language and the translated English version.

    What I have written here was translated with DeepL.com

  • How to copy strings?

    8
    0 Votes
    8 Posts
    955 Views
    astrosofistaA

    @Alan-Kilborn said in How to copy strings?:

    I suppose my posted script has “extensibility” going for it, as opposed to the macro solution, that to me seems difficult to extend to even single quotes.

    Yes, though my regex solves OP’s problem, lack of extensibility is one of its drawbacks - Regarding this issue, for the moment I run out of ideas, but don’t give up.

    Also, compared with your PS, my regex has another drawback, as it couldn’t preserve the original position of the caret. What a shame! ha ha

    Have fun!

  • 0 Votes
    9 Posts
    3k Views
    guy038G

    Hello, @carverof-canyons and All,

    Thank you so much for your appreciation. No, I’m not a paid staff member, at all ! Just a volunteer, who loves N++ and be happy to help people when I guess a possible solution ;-))

    And, anyway, I am confined at home, in France, like everywhere else, in the world. So, presently, I have plenty of time to think about some problems !

    Cheers,

    guy038

  • Duplicate lines that included same strings after / film /

    7
    0 Votes
    7 Posts
    297 Views
    guy038G

    Hi, @kaveh-202 @alan-kilborn and All,

    Let suppose, to begin with, to focus on the first 10 chars, after the string /film/

    Then, from your example :

    http://dl3/film/Daylights.End.3******************* http://dl4/film/The.Phenom.2016******************* http://dl45/film/The.Wild.Life.720*************** http://dl58/film/Pele.Birth.Of.A******************* http://dl4/film/Sultan.2016.720******************* http://dl3pw/film/The.Guvnor.2016******************* http://dl3.pw/film/The.Wild.Life.2******************* http://dl3.f/film/An.Almost.Perfe******************* http://dl3.ftk.pw/film/Scooby.Doo.And.******************* http://d2/film/A.Conspiracy.Of******************* http://dl45/film/Daylights.End.2*******************

    With the simple regex S/R, below :

    SEARCH (?-s)^.+/film/(.{10})

    REPLACE \1\t$0

    We get the text :

    Daylights. http://dl3/film/Daylights.End.3******************* The.Phenom http://dl4/film/The.Phenom.2016******************* The.Wild.L http://dl45/film/The.Wild.Life.720*************** Pele.Birth http://dl58/film/Pele.Birth.Of.A******************* Sultan.201 http://dl4/film/Sultan.2016.720******************* The.Guvnor http://dl3pw/film/The.Guvnor.2016******************* The.Wild.L http://dl3.pw/film/The.Wild.Life.2******************* An.Almost. http://dl3.f/film/An.Almost.Perfe******************* Scooby.Doo http://dl3.ftk.pw/film/Scooby.Doo.And.******************* A.Conspira http://d2/film/A.Conspiracy.Of******************* Daylights. http://dl45/film/Daylights.End.2*******************

    Then, it’s obvious that the first and last line are duplicates ( Daylights. ) , as well as lines 3 and 5 ( The.Wild.L )

    Now, what do you want to do regarding lines 1 and 11 and lines 3 and 5 ?

    Presently, it’s quite easy to build a regex which would delete all duplicates lines, keeping only the last one found !

    Two other questions :

    Do you mind if a sort process is used, which, of course, would alter the initial order of lines ?

    How many duplicates lines may have a line ? Only 1 duplicate or more ?

    BR

    guy038

  • File Search not working for files in long paths

    3
    1 Votes
    3 Posts
    438 Views
    Tom_Cox001T

    I suggest you Long Path Tool will let you easily

    delete, copy or rename long path files, you can try it

    for better service.

  • Open long path/ file name error since 7.5.9

    10
    0 Votes
    10 Posts
    5k Views
    Tom_Cox001T

    I suggest you try Long path tool is the very good

    program for easily delete, copy & rename long path

    files, error, unlock solution.
    Try it and solve your problem.

  • Logging in to Notepadd++ Community

    8
    0 Votes
    8 Posts
    1k Views
    donhoD

    Thanks Andrew Rodrigues (NodeBB support team), the login page has been reworded to “Available Logins” now:
    https://community.notepad-plus-plus.org/login

  • Odd Query Regarding Sessions & Preferences

    10
    1 Votes
    10 Posts
    426 Views
    Alan KilbornA

    @Miss-Chief said in Odd Query Regarding Sessions & Preferences:

    You think multiple instances would impact it?

    Yes, I think it could. Each instance shares the same settings, and the instance you close LAST will write the settings.

    So say you have 2 instances open, call them A and B. If you go into instance A’s settings and you turn off the tool bar, instance A’s tool bar will (obviously) not be shown but instance B will still have a tool bar.

    If you then quit instance A and then quit instance B and then restart Notepad++, what you get will have a tool bar.

    However, if you had quit instance B and then quit instance A and then restarted, what you get will NOT have a tool bar.

    I don’t think the automatic session management stuff works the same way as a setting like the tool bar, at least a quick test didn’t show that it did, but…

    I avoid this sort of multi-instance running myself, for these types of reasons.

    At most I ever want/need is one additional instance, so I have a secondary portable version of Notepad++ hanging around for just such a need. I have a Run menu item set up to run this secondary instance from my main instance. Since both instances have totally different settings and sessions, I don’t have any problems. Such a setup is convenient for me, but I recognize that it isn’t necessarily convenient for everyone.

  • 0 Votes
    10 Posts
    489 Views
    juon2ndJ

    Thank you, thank you, thank you! Terry’s last solution did the trick. Thanks for the elaborate explanations, I’ll learn more about regex later when I have the time, for now by doing this simple search I killed at least a thousand times of repetitive CTRL V and can smoothly proceed with my translation.
    Cheers

  • Drag-and-Drop Code with Connecting Operators

    1
    0 Votes
    1 Posts
    223 Views
    No one has replied
  • Unable to change caret color

    3
    0 Votes
    3 Posts
    355 Views
    PeterJonesP

    @Emory-Colvin said in Unable to change caret color:

    came back to it later and it was fixed

    I am glad it’s working for you now.

    Apparently it can’t keep up with realtime changes to the formatting.

    Just so you know, mine changes the color of the cursor immediately; I am wondering if you have a huge file, or many large files open, or something like that.

  • Select all text on all open files?

    5
    0 Votes
    5 Posts
    1k Views
    EkopalypseE

    Not quite sure I understand.
    The workflow is like this

    get number of open files (NPPM_GETNBOPENFILES) retrieve the bufferids for these files (NPPM_GETOPENFILENAMESPRIMARY/NPPM_GETOPENFILENAMESSECOND, NPPM_GETBUFFERIDFROMPOS) activate the bufferids (NPPM_ACTIVATEDOC) read the content (SCINTILLA API GetTextT)
  • 0 Votes
    5 Posts
    462 Views
    felad0001F

    I haven’t no. I’m not familiar with macros in Notepad++, but it surely sounds like a good idea. I’ll try to give it a try :)

    Thanks

  • 0 Votes
    6 Posts
    514 Views
    Alan KilbornA

    @NemoNobobyPersonne

    Are you trying to tell us that you are just getting around to following up on an issue you opened 16 months ago?

  • I want to use the 'Uncollapse Current Level' shortcut.

    2
    0 Votes
    2 Posts
    864 Views
    EkopalypseE

    @정태곤

    Sorry, but hard to understand what your issue is.
    Could you please explain a little bit more precisely
    what works and when not?

  • Why does "Find result" window tab icon look like it does?

    11
    0 Votes
    11 Posts
    534 Views
    EkopalypseE

    Too much time and nothing works as expected, results in gifs and gifs and even more gifs :-)

  • How to Find all comma and replace it with a Hard Return (HRT)

    4
    0 Votes
    4 Posts
    587 Views
    Robert Long 0R

    @PeterJones Awesome! Thank you
    I forgot to do Regular Expression

    Thank you for the quick reply

  • Regex: Find all files that do not contain some words

    12
    -1 Votes
    12 Posts
    26k Views
    Alan KilbornA

    Cross-link to perhaps a better solution:
    https://community.notepad-plus-plus.org/post/51935

  • Cant load my code in Chrome

    3
    0 Votes
    3 Posts
    315 Views
    PeterJonesP

    @Aadil-Sohail ,

    I am going to take a wild guess (though you weren’t very clear in your original post), since you included the Notepad++ specific shortcuts.xml reference, that you are editing your website code (assumed HTML) in Notepad++, and used Run > Launch In Chrome to view your website in a browser.

    I am further going to assume that you named your file blah rather than blah.html, because then Chrome would have no reason in the world to assume that the underlying bytes were meant to be html, and would thus show you the raw source code, rather than rendering the HTML. I am going to assume that Microsoft, in their Edge browser, like in many other Microsoft products, assumes it knows better than the user what should really happen, and ignores the filetype, and instead guesses at the “real” filetype, even when you pass it a file with no extension

    Fortunately, if I am right, Notepad++ will be very useful, because it will show the full file path, including directory, name, and extension, in the title bar (unless you have set Settings > Preferences > MISC to enable Show only filename in title bar as described in the official preferences documentation – if so, disable that). Or you can hover over the tab name, and the full path, name, and extension will be shown. If I am right, use File > Rename to fix the name to actually include .html in the name.

    I could be wrong, however, because you gave us next to nothing to go on. Or Alan could be right, and you were actually asking an HTML/webcoding question rather than asking a question specific to Notepad++.

    But I’m hoping that my wild guess is right, and I’ve been able to help you, despite your lack of information. Or that, at the very least, it will encourage you to provide more information so that we can help you. (Though if it’s an HTML question, Alan is right, and this isn’t the right place)

  • Spell Check not showing suggestions

    1
    0 Votes
    1 Posts
    165 Views
    No one has replied