• Changelog of notepad++ releases?

    2
    0 Votes
    2 Posts
    290 Views
    PeterJonesP

    @Vanshika-Warathe ,

    I don’t think I have ever noticed Notepad++ publish a change as a result of a “CVE”.

    There is definitely not an API for accessing changes. Each version comes with its own change.log. And those are all amalgamated into https://github.com/notepad-plus-plus/notepad-plus-plus/wiki/Changes . I don’t find CVE mentioned on that page anywhere, though “security” is mentioned a few times.

  • A single UDL.xml for both theme types (light and dark)?

    17
    0 Votes
    17 Posts
    2k Views
    Lycan ThropeL

    @PeterJones ,
    Interesting, but my environment is so custom done, overriding the system defaults that it’s a mess either way. :) But it seems to work.

  • Copy and paste sections with RegEx or macro?

    7
    0 Votes
    7 Posts
    1k Views
    guy038G

    Hi, @venus642, @neil-schipper and All,

    Oh… yes, totally exact and clever iniiative Neil, indeed !

    Of course, as the " character and the string ";" seemed to be separators, I presumed that they were not used within the content of the questions. But I agree that this new formulation is safer !

    So, @venus642, the second regex S/R to use is, preferably :

    SEARCH ☑(?=(?s:(?!"\R).)+";"\R)

    REPLACE

    Cheers,

    guy038

  • How do I replace a particular sentence across multiple files?

    24
    0 Votes
    24 Posts
    2k Views
    guy038G

    Hi, @terry-r,

    Of course, in absolute terms, you’re quite right about it ! But I would say that people are responsable of what they write !

    My regex finds a word Please, followed later with the nearest word E-mail, followed later with the nearest word treatment

    If, because of some typos, one or several of these 3 words are truncated or modified in any way, due to the initial (?s) modifier, the regex engine will always try to find out, by all means, a match, if any !

    Note that I suppose a possible variation by telling, in my previous post : " Check the Mach case option, if necessary "

    Thus :

    Any malformed word is just considered as stuff, part of the regex part .+?

    And for the smallest range of characters containing these 3 words in that order ( Please ... E-mail .... treatment ) :

    A <b> string is inserted before the first word Please

    A </b> string is inserted after the final word treatment

    No more, no less !

    BR

    guy038

  • Regex: How do I search for My_String [any characters] [quotation mark] ?

    18
    0 Votes
    18 Posts
    4k Views
    IanSunlunI

    @PeterJones Ah, thats good to know, thanks !

  • Function List for UDL - multi-line regex

    9
    0 Votes
    9 Posts
    550 Views
    J

    @Lycan-Thrope

    Of course, I realized that after @PeterJones posted his answer.

  • 0 Votes
    5 Posts
    628 Views
    IanSunlunI

    @Alan-Kilborn Now that I put the \r in, it is finding the literal equals sign.
    Before I was putting =\n, it should be =\r\n as I am on Windows.

  • Replace a line with 2 new lines

    4
    0 Votes
    4 Posts
    355 Views
    Alan KilbornA

    @Edgar-Rousselin

    Try:

    Find: ^N\d{3} M9$

    You can learn some of this (regular expression) stuff yourself.
    See the USER MANUAL section.
    Also see the FAQ entry.

  • How to turn off printing background color of changes?

    4
    0 Votes
    4 Posts
    3k Views
    Alan KilbornA

    @guido66611x said in How to turn off printing background color of changes?:

    I’ll wait for the next version release.

    Wait no longer.
    Get 8.4.7 from HERE.

  • Find repeating lines in a line?

    3
    0 Votes
    3 Posts
    368 Views
    Neil SchipperN

    @Digi-Uzman

    When you say extract, what exactly do you mean? Do you want them deleted? Or is it good enough to simply identify them so you can take further action?

    Do you care about preserving the original order of lines in the file that needs to change (if a file will change)?

    It would be best if you could provide three

    sample text blocks (see FAQ, find section on "literal text boxes: used in many other posts on this site).

    https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts

    Show file1 sample text and file2 sample text, making sure to include both cases that do and do not have matches, maybe 5 - 20 lines each, and then in the third show exactly what you want to end up with.

    I’m fairly certain what you want can be done. If order preservation is important it might be a multi-step process.

  • Disconnect on save with NPPFTP

    3
    0 Votes
    3 Posts
    991 Views
    iChal2112I

    I’ve recently returned to using NppFTP and have noticed the same thing - it’s very annoying!
    After finding the work-around I’ve described below, it leads me to believe that the problem (in my case) might be that the default cache location is not writable without admin privileges (which have recently been changed on my work PC due to a security breach).
    I haven’t ‘upgraded’ to Windows 11 yet, so can’t say whether Notepad++ is trying to cache the files a privileged location, but it worked for me.

    I found that the problem went away when I assigned a (writeable) local path to the external path. I haven’t had any problem since.

    I hope this helps.

    Untitled.png

  • Macro for Open, Find and Replace and Save

    22
    0 Votes
    22 Posts
    4k Views
    Jaguar AsadJ

    @guy038 said in Macro for Open, Find and Replace and Save:

    Hello, @josé-luis-montero-castellanos, @aln-kilborn and all,

    @josé-luis-montero-castellanos, regarding your regex S/R :

    SEARCH (?s)(<St)(.)(/S)(.)(<Xt)(.)(/X)|(<Xt)(.)(/X)(.)(<St)(.)(/S)

    REPLACE ?1\5\2\7\4\1\6\3:${12}${9}${14}${11}${8}${13}${10}

    Why do you need the leading in-line modifier (?s), in the search part ? Do you mean that the single char . in group 2, 4, 6, 9, 11 and 13 may also represent a line-break char ( \r or \n ) ?

    I suppose not ! Then, your correct search regex is rather :

    (?-s)(<St)(.)(/S)(.)(<Xt)(.)(/X)|(<Xt)(.)(/X)(.)(<St)(.)(/S)

    where any . single char will represent a non-break char, only !

    Now, I noticed that the groups used, in replacement, for each alternative of the search regex, are in the same order ! Then, you can use, preferably, a specific feature of the Boost Regex engine, called Branch Reset

    For instance, in your regex, the numbers of each group are :

    (?-s)(<St)(.)(/S)(.)(<Xt)(.)(/X)|(<Xt)(.)(/X)(.)(<St)(.)(/S) Gr : 1 2 3 4 5 6 7 |8 9 10 11 12 13 14

    If we use the Branch Reset feature the search regex becomes :

    (?-s)(?|(<St)(.)(/S)(.)(<Xt)(.)(/X)|(<Xt)(.)(/X)(.)(<St)(.)(/S)) Gr: 1 2 3 4 5 6 7 |1 2 3 4 5 6 7

    Thus, your entire regex S/R can be simplified as below :

    SEARCH (?-s)(?|(<St)(.)(/S)(.)(<Xt)(.)(/X)|(<Xt)(.)(/X)(.)(<St)(.)(/S))

    REPLACE \5\2\7\4\1\6\3

    For instance, given this INPUT text :

    <St2/S4<Xt6/X <Xt9/XB<StD/S

    You would get the OUTPUT text, below :

    <Xt2/X4<St6/S <St9/SB<XtD/X

    Notes :

    The Regular expression option must be selected

    Preferably, tick the [Wrap around](https://www.ahijoy.com/) option

    Best Regards,

    guy038

    I tried it but didn’t work

  • Make NPP list its current shorcut key assignments?

    9
    0 Votes
    9 Posts
    5k Views
    PeterJonesP

    Future reference:

    More of the solution to this, with example scripts, is found here

  • Replace specific line #s within multiple programs

    8
    0 Votes
    8 Posts
    755 Views
    Alan KilbornA

    @Scott-Raskin said in Replace specific line #s within multiple programs:

    how to replace that with all of that text below

    Arguably the easiest way is to do this:

    select your desired replacement text:
    955b70e6-212a-41a3-a9a9-1ba3ca2813f5-image.png

    press Ctrl+Shift+f to bring up Find in Files window; your desired replacement data will be in the Find what box (not in Replace with where you want it):
    c7416569-fac0-4b52-b7a4-75f5d8381692-image.png

    press the “up/down arrow” – aka “swap” – button to move your data from Find what to Replace with:
    61e5360d-2997-4480-a9c3-8df561aaf540-image.png

    put your search expression into Find what, and continue on with hopefully obvious steps to accomplish your replacement operation

  • Closing when connecting

    8
    0 Votes
    8 Posts
    419 Views
    Alan KilbornA

    @ArlynSilverthorn

    If all you are capable of doing is saying “it doesn’t work”, then no one can help you. Please reference Peter’s prior post.

  • File explorer initial remote directory - hide unwanted path from root

    8
    1 Votes
    8 Posts
    769 Views
    erik parkerE

    @PeterJones Yes, what you wrote is correctly what i have on mind.

    The reason why i dont want to see what is before initial dir is:

    waste of space on explorer annoying scrolling when there are more subdirs when you resume your work (after opening NPP) and you CTRL+S the file, File explorer starts from the root, which makes it very annoying to go back to the saved file position. Imagine i have like 10+dirs from the root.

    At the moment im doing it like this: I open NPP, i close all tabs which are already opened, then i connect to the server and open files again.

  • Delete some lines

    3
    0 Votes
    3 Posts
    224 Views
    Roel JongmanR

    Thank you Allan,

    I was aware of the find-and-replace option, but did not know how to select the whole line.
    I worked just fine for me.

  • Windows Updates Problems

    8
    0 Votes
    8 Posts
    1k Views
    ghwmorgG

    @Terry-R

    The funny thing is that before receiving for you, the idea of opening N++ without plugins, after Windows updates, N++ could not stay open. But it has been shown that without plugins; Yes.

    That information, as it is, is curious.

    Greetings.

  • Remove columns

    4
    0 Votes
    4 Posts
    18k Views
    TheNainBoyT

    @guy038 you saved my life men , hats off u buddy…

  • Printing also gives gray background

    3
    0 Votes
    3 Posts
    399 Views
    Michael RochollM

    @PeterJones said in Printing also gives gray background:

    @Michael-Rocholl ,

    See the “Known issues” section at the bottom of this FAQ.

    Thanks for quick response - Michael