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
      208 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.
    • donhoD

      Fake Notepad++ website

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

      Notepad++ release 8.9.8

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      4
      5 Votes
      4 Posts
      1k 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.