Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • Neculai I. FantanaruN

      REGEX: Change the name in reverse order

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      0 Votes
      6 Posts
      227 Views
      PeterJonesP
      @Neculai-I.-Fantanaru , It’s not your originally-stated request (ie, it does not put those exact numbers in reverse order), and it won’t work if your number range changes. But if it works for what you really want (rather than what you asked for), that’s great for you. Someone said you can’t get increment with regex, well, you can Not generically, you can’t. If you have a limited set of numbers, it’s really easy to do, as you found, by crafting regex cumbersome regex, but those get less viable the wider range of numbers you want – just try going from 101 - 199, for example; or, worse, from 101-9999 – . Guy has shown much wider ranges than your effort, but it will never be generic, as someone will always need “one more digit” than your regex provided. (update: I also don’t see how that’s “increment”, in any meaningful interpretation of the word: it doesn’t just “add X” to the original number; it just copies the last digit to before the first) Also: Per my reading of your original question, where I assumed “in reverse order” meant 162 ↔ 151; 161 ↔ 152; 160 ↔ 153 (like you said), rather than some weird rearrangement of the digits withing a given number (151→1151, 152→2152, …) (like I now see that I think your python did: I hadn’t bothered reading your python before, because I assumed it did what you said you wanted), I would now propose a different solution to what I thought you were asking for, given that you seem to only care about 151-162, and no other numbers: FIND = Page_(?:(151)|(152)|(153)|(154)|(155)|(156)|(157)|(158)|(159)|(160)|(161)|(162)) REPLACE = Page_(?{1}162)(?{2}161)(?{3}160)(?{4}159)(?{5}158)(?{6}157)(?{7}156)(?{8}155)(?{9}154)(?{10}153)(?{11}152)(?{12}151) – but since that’s not generic, it’s 99.9999% of the time not what someone would would want, if they phrased the question the way you did in your title and your mapping. I now don’t think this is actually what you wanted, based on your python and your pseudo-increment; but if it is what you originally wanted, feel free to use it.
    • J

      UDL: set multicharacters delimitators/keywords that also accept escaping characters to neglet

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · udl udl folding
      5
      0 Votes
      5 Posts
      173 Views
      PeterJonesP
      @Jacopo-Remondina , I am still not sure what you want for FOLDING and what you want for KEYWORD and what you want for DELIMITER and what you don’t want detected at all. But at this point, I’m guessing that what you want is too complicated for the simplistic keyword/token matching used for UDL. For FOLDING, it’s designed to either match spaces-not-needed so the open/mid/closing all don’t require spaces, or to match spaces-required so the open/mid/closing all do require spaces; it is not meant to mix, so that the open doesn’t require spaces but the close does. The easiest workaround is what you already know: enumerate them all. I don’t think you’re going to find a better solution.
    • donhoD

      Notepad++ release 8.9.8

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      4
      5 Votes
      4 Posts
      2k Views
      A
      @Danny-Duplechian From my cursory reading of the change logs, there is a lot of new security-related functionality, specifically related to NTLM authentication. I’m NOT an expert, but npp is now checking with you before accessing non-local paths, in an attempt to determine what should (not) be trusted. These non-local paths may appear in your .npp-session file, among others. If these reads are done on untrusted servers, your “NTLMv2 hash” may (will?) be sent and possibly used against you. If you recognize the server, click Load or Always load.
    • K

      Search & Replace syntax

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      158 Views
      CoisesC
      @KRadiants said: 1: False on both counts. Here is an example line <attribute id="Selectors" type="LSString" value="SelectSkills(ed664663-93b9-4070-a54b-3c7b19c0e7b4,3);SelectSpells(61f79a30-2cac-4a7a-b5fe-50c89d307dd6,2,0,BardCantrip,,,AlwaysPrepared);SelectSpells(dcb45167-86bd-4297-9b9d-c295be51af5b,4,0,BardSpells);SelectEquipment(aab8c5b5-eacf-4867-8e5f-bd4de3a9132e,1,BardInstrument);SelectAbilityBonus(b9149c8e-52c8-46e5-9cb6-fc39301c05fe,AbilityBonus,2,1)"/> There is a blank before, and sometimes there is something before and/or after it Otherwise, this is correct. OK, so in this example you want to end up with: <attribute id="Selectors" type="LSString" value="SelectSkills(ed664663-93b9-4070-a54b-3c7b19c0e7b4,3);SelectSpells(61f79a30-2cac-4a7a-b5fe-50c89d307dd6,BardCantrip,,,AlwaysPrepared);SelectSpells(dcb45167-86bd-4297-9b9d-c295be51af5b,BardSpells);SelectEquipment(aab8c5b5-eacf-4867-8e5f-bd4de3a9132e,1,BardInstrument);SelectAbilityBonus(b9149c8e-52c8-46e5-9cb6-fc39301c05fe,AbilityBonus,2,1)"/> ? If that’s correct, try the same expression I suggested before, except remove the ^ from the front: Find what: (SelectSpells\([\d\-abcdef]+),\d+,\d+ Replace with: $1
    • donhoD

      Fake Notepad++ website

      Watching Ignoring Scheduled Pinned Locked Moved Security
      3
      2 Votes
      3 Posts
      168 Views
      Lycan ThropeL
      @donho Reported to both sites per your request to help keep the community safe.
    • Afik GilboaA

      nppftp and and windows 11

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      11
      0 Votes
      11 Posts
      706 Views
      xomxX
      @Afik-Gilboa said: both of them have the “run as administrator” unchecked. so any ideas why it keeps opening in admin mode? apparently everything running as administrator here, not sure why but it’s everything… I recognize the symptoms - you probably have turned off the Windows UAC completely somehow and at the same time the account, you are logged in, has the administrator rights (then everything launched will have the admin rights as default). Check your Registry for EnableLUA REG_DWORD 0x00000000 in: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] (click on Windows Start, start typing “Reg” there, click on the Registry Editor (System) app offered and navigate there to the hive path above) If there is that 0x00000000 (OFF), change it do 0x00000001 (ON) and restart your PC.
    • Najeeb HajjiN

      Download Says we are with Ukrine

      Watching Ignoring Scheduled Pinned Locked Moved Boycott Notepad++
      3
      1
      -1 Votes
      3 Posts
      4k Views
      P
      “400k severly wounded ukrainian soldiers”, sorry.
    • A

      User defined language seems to support only one extension

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      1
      0 Votes
      4 Posts
      260 Views
      PeterJonesP
      @André-Programmeren said: As far as I remember I stopped and re-started Notepad++ Notepad++ saved it’s current language for that file (plain text) in the session config, then used that saved session config when you restarted. (This is a critical feature when one extension can have multiple meanings, and you have overridden the default language for a particular file) OTOH, if you close the file, Notepad++ discards meta-information, like what language was previously served, and so re-applies its internal rules and will see the UDL extension when you re-open the file.
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      128
      6 Votes
      128 Posts
      42k Views
      CoisesC
      @guy038 said: Now, I did a test, searching in all files of my D: USB key, with : The native N++ Find in Files dialog The Search++ Search in Files dialog The MultiReplace Find All in Files command To be sure to process fair tests, I unplung my USB key, re-start my laptop completely, replug my USB key and starts a new N++ session, before running these three Find in Files operations, in turn ! I searched for the Fi string, with the Match case and the Regular expression options checked. I got : 27,112 matches in 833 files of 1,761 searched for the N++ Search Results panel, in 1m 37s 27,112 matches in 833 files of 1,761 files for the Search++ Search++ Results, in 2m 21s 27,087 hits in 835 file(s) for the MultiReplace Search results panel, in 1m 36s I have been struggling with how to optimize the multithreading of my search for over a month now. Among other things, I’ve found that most everything I thought I was measuring wasn’t what I was actually measuring. One surprise I only recently discovered was that even if I eject and unplug a thumb drive and then plug it in again. there is still a “first time today” cost in the time it takes to read it. Windows is persisting something and it is able to identify the same drive, even though it’s been unplugged. I don’t know the exact time, but Windows on my machine keeps it for more than an hour and less than 24 hours. Running a particular test the first time I plugged in a particular USB drive I have, it took 8 minutes and 26 seconds. After ejecting the drive, unplugging it, waiting a moment, plugging it back in and running the exact same test, it took 20 seconds. This drive appears to take whatever it is that Windows does once a day (?) exceptionally hard. Most drives don’t show anything so obvious. This is the only drive I have tested so far that uses FAT, so that could have something to do with it. I haven’t yet tested whether rebooting is enough to reset the “once a day” penalty, or if it persists in something that isn’t lost in a reboot. It may have something to do with antivirus, though I haven’t yet proven any such thing. So I’m wondering, if you happen to remember, whether you tested in the order you listed, or whether you happened to test Search++ first? In any case, after weeks of running in circles, I think I will soon give up the fight to optimize performance and see what else needs work.
    • AZJIO AZJIOA

      The author asks to finance the war

      Watching Ignoring Scheduled Pinned Locked Moved Boycott Notepad++
      16
      -3 Votes
      16 Posts
      19k Views
      P
      @Safe-Tex Firstly, the question of Palestine is not the subject here. Secundly, you can’t know Alan Kilborn’s opinion about Israel, Palestine, and the conflict which opposes them. Lastly, the reliability of sources as Fox News or the Times of Israel don’t have any impact on the reliability of ruSSian sources, which are usually putin’s way to spread his bullsh*t deceitful propaganda (so yes, ruSSian site => lies).
    • S

      Is there a serious reason why a "user-defined language" cannot specify the encoding?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1 Votes
      3 Posts
      215 Views
      S
      @PeterJones, many thanks to Your reply. This workaround works perfectly. I searched for this workaround (because I expected that anyone wouls have the same needs) but wasn’t successful - searching for a solution to a problem can be a frustrating experience if you don’t use the right search term(s) — which, of course, you don’t know yet at that stage…
    • S

      [New Plugin] EncTags — inline text encryption via ^^...^^ tags

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1 Votes
      3 Posts
      233 Views
      rdipardoR
      @saintleningrad-prog said: Select text, or place the cursor inside a ^^…^^ tag, press Ctrl+Shift+E Just a head’s up: that’s the same default key combination that decodes HTML entities when HTML Tag is installed. Since plugin commands are mapped in alphabetical order, and the most recent mapping prevails, having both installed will silently block the EncTag’s plugin shortcut from functioning: [image: 1787355567929-enctags-v020-shortcut-conflict.png] One more thing: the text you are passing to the About message box (here) contains the literal Unicode character U+2013: EN DASH. Since the Unicode literal is inside a character string, the compiler interprets everything between "..." as if it were encoded in the operating system’s default, single-byte code page (usually Windows-1252 on English- or European-language PCs). When shown, the emdash becomes the string of nonsensical bytes \xe2\x80\x94: [image: 1787355726977-enctags-v020-mojibake.png] You just need to escape the Unicode literal, i.e., "Ctrl+Shift+E \u2013 ..."