• Move the entire tag to another location in the same XML file

    6
    0 Votes
    6 Posts
    655 Views
    guy038G

    Hello, Hi, @tư-mã-tần-quảng and All,

    I forgot to explain my regex S/R :

    SEARCH (?s-i)(\h+<name>.+?)(\h+<id>.+?\R)

    REPLACE \2\1

    So :

    First, the part (?s-i) has already been explained by @alan-kilborn !

    Then, the part \h+<name> searches for some horizontal blank characters, followed with the string <name>, with this exact case

    Now, the part .+?, due to the s modifier, looks for the shortest non-null range of any char, even EOL ones, till … some blank chars, again, followed with the string <id>, with this exact case

    The two parts above are stored as group 1 because of the surrounding parentheses. Note that it, necessarily, ends with EOL chars, as followed with the <id> line !

    Then the part \h+<id> matches any horizontal blank chars, followed with the string <id>, with this exact case

    Finally, the part .+?\R matches the shortest non-null range of any char till… the next EOL chars, so ending the <id> line

    Again, the two parts above are stored as group 2 because of the surrounding parentheses.

    Note that the \R syntax stands for any kind of line-break ( \r\n for Windows files, \n for Unix files and \r for Mac files )

    In replacement, the \2\1 rewrites, in reverse order, the single-line group 2 ( line <id> ) and the multi-lines group 1

    Best Regards,

    guy038

  • search-replace

    4
    0 Votes
    4 Posts
    247 Views
    khk khkK

    @khk-khk Thanx to all - I’ll try

  • How to opt out of OAuth App but continue to have access to the NPP forum?

    5
    0 Votes
    5 Posts
    291 Views
    PeterJonesP

    @Alan-Kilborn said in How to opt out of OAuth App but continue to have access to the NPP forum?:

    Just a bit more, here…

    Thanks for the clarification: that was probably wise to add the extra information.

  • Need a copy of the red marked regions, after a "Mark All" operation

    13
    0 Votes
    13 Posts
    1k Views
    Alan KilbornA

    @guy038

    in case of overlapping matches

    Well, I meant non-overlapping matches of course. Often while marking data it is simpler to come up with 3 or 4 successive marking operations on different data in order to capture everything you want; coming up with one regex, while perhaps an interesting exercise, would likely be distracting from your at-hand task.

  • How to change Compair Plugin background color for unmatched lines?

    2
    0 Votes
    2 Posts
    236 Views
    Fran-3F

    Suddenly the light bulb went off…
    Click Plugins > Compare > Settings
    and then experiment with the colors to find a background color you like for mismatched lines.

  • Session bug in v7.8.5 ?

    13
    0 Votes
    13 Posts
    3k Views
  • 1 Votes
    4 Posts
    450 Views
    mccrispyM

    @PeterJones Thanks for the repro work! I had a strong suspicion that the location of <LanguageAutoComplete> is hardwired (why would it not have been included in <UserLocations> if there wasn’t some reason - presumably technical - for it?)

    Frankly, I consider it a Security issue to have user configurable files in %ProgramFiles(x86)% (I’m not alone in this regard!). Now on my machine Controlled Folder Access is enabled and I’m not sure how that interacts with UAC folder virtualisation (VirtualStore) for x86 apps and I’m not about to find out by experimentation. I’ll give it a few days then log a (security) bug.

  • Change the extension of the .txt file

    11
    0 Votes
    11 Posts
    10k Views
    Fake TrumF

    @PeterJones It is not always convenient like this. Perhaps today I am lucky, to meet you. I am using google to translate. And my question was brief, so Google did a good job. Once again very thank you for this

  • about selection

    47
    0 Votes
    47 Posts
    11k Views
    cisco779kC

    @guy038 tanxs you so much for your explanation and for modification to your reg-ex!
    now it works very well!
    I never said I had an example like yours, but maybe it’s my fault that I didn’t explain myself well …
    everything is working fine now. always thanks for your regex!
    cheers

  • Recent update changes language colors

    6
    1 Votes
    6 Posts
    2k Views
    Emma MorrisE

    Alright, thanks for your help everyone! Deleting the langs.xml file fixed it.

  • Ubuntu - no font displays 'ł' and some other Polish characters

    1
    1 Votes
    1 Posts
    199 Views
    No one has replied
  • XML Tools 3.0.3.3 delay N++ start for TWO minutes

    3
    0 Votes
    3 Posts
    252 Views
    JoseLuis C.B.J

    Thanks a lot @Ekopalypse. It works perfect (as expected!!)

  • How can I search a specific numbers in between two numbers?

    3
    0 Votes
    3 Posts
    989 Views
    guy038G

    Hello, @BDz48, @gurikbal-singh, and All,

    Don’t forget to select the Regular expression search mode for a correct result of the @gurikbal-singh’s regex

    Now, if you do not want a match when the number 6.. is surrounded with other numbers as, for instance, in text 497954316579791310932, use the regex \b(6\d\d|700)\b

    Best Regards,

    guy038

  • Type of duplicate lines

    25
    0 Votes
    25 Posts
    5k Views
    Sarah DuongS

    @astrosofista Yes, that is exactly what I need. It seems that there are some symbols I cannot write . It replaces the color or does not display when accompanied by another symbol.

  • Version 7.8.5 ( 32bits) not able to replace a comma correctly

    5
    0 Votes
    5 Posts
    323 Views
    guy038G

    Hi @mark-marques, @ekopalypse, @alan-kilborn and All,

    To control which plugin(s) is/are loaded on Notepad++ start :

    Close any opened N++ instance

    Reach your active plugins location

    For any plugin , NOT desired, simply change the name of its folder ( for instance, add a simple character at beginning or end of each name ! )

    Restart Notepad++

    For instance, my own 7.8.5 plugins folder contains the following subfolders :

    BetterMultiSelection ComparePlus Config doc DSpellCheck ElasticTabstops mimeTools NppConverter NppExport NppPluginDemo

    If I want to open Notepad++, without, let’s say, the DSpellCheck and the Npp PluginDemo plugins, simply rename these 2 subfolders, like below :

    BetterMultiSelection ComparePlus Config doc -DSpellCheck ElasticTabstops mimeTools NppConverter NppExport -NppPluginDemo

    OR

    BetterMultiSelection ComparePlus Config doc DSpellCheck_0 ElasticTabstops mimeTools NppConverter NppExport NppPluginDemo_0

    Best Regards,

    guy038

  • Compile and run didn't show cmd

    4
    0 Votes
    4 Posts
    258 Views
    EkopalypseE

    @Darisky

    Sorry, but I don’t understand your last post.
    Did you try my suggestion about using hello.cpp instead of hello.

  • BUG: syntax highlighting not working

    11
    0 Votes
    11 Posts
    10k Views
    alindbergA

    I had the same issue for PHP files.

    The solution was to include the opening tag <?.

    The file I was using was just a scratch bit of PHP thus no tag was included. The same is true for HTML files. The opening tag, <html would be required.

    Languages like Javascript, SQL, etc., that don’t require tags work as expected.

  • Removing Spaces after | sysmbol

    6
    0 Votes
    6 Posts
    483 Views
    astrosofistaA

    Sorry people, here is the working link to the animated gif (couldn’t edit it in time):

    https://giphy.com/gifs/eKh1aKIxZOEUB2308F

    @astrosofista said in Removing Spaces after | sysmbol:

    Hi:

    OK, just for the non-regex oriented people in the list, let me suggest you an alternative approach to delete those unwanted blank spaces.

    This little thingy requires the BetterMultiSelection plugin to get the job done, as follows:

    giphy

    In case you couldn’t read the instructions while the gif is playing:

    Insert a multi-selection ( Click, Shift + Alt + Down Arrow ) Press the End key Then, Control + Left Arrow Finally, press Back-Space.
  • feature request - word wrap per tab

    17
    3 Votes
    17 Posts
    3k Views
    PeterJonesP

    @Stan-Dm said in feature request - word wrap per tab:

    +1 for this feature request, I have to flip my word wrap settings back and forth all the time, it’s getting annoying!

    Might be a good idea. But +1-ing it here won’t affect the status of the feature request at https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5232 .

    if it’s annoying for you, both this forum and the issues page show a PythonScript workaround that you can use while you are waiting to see if the feature is ever accepted or implemented. But given there’s a simple PythonScript workaround, there’s a good chance it never will be. (The developer philosophy for this project is that if it can easily be or has been implemented using a plugin, it’s not likely to be implemented as a native feature.)

  • Autocorrect: Shortcut Key to Hide Popup When Editing Text?

    2
    0 Votes
    2 Posts
    590 Views
    Alan KilbornA

    @John-BPC

    The Escape key, maybe?