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
      167 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
      143 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

      Fake Notepad++ website

      Watching Ignoring Scheduled Pinned Locked Moved Security
      2
      1 Votes
      2 Posts
      85 Views
      M
      @donho said: An user reported a fake Notepad++ website to me via email this morning: https://notepad-plusplus.org/ I reported that bad website to both links that you provided. Murray
    • donhoD

      Notepad++ release 8.9.8

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      3
      5 Votes
      3 Posts
      1k Views
      D
      @donho I began seeing this message pop up [image: 1787757775487-aef4a424-5de2-405e-86bc-42f5e80462dc-image.jpeg] Why is it suddenly concerned about my network path? And why would it expose my login information, and to who if im in a trusted network from a trusted PC?