Community
    • Login

    Very long pattern

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    21 Posts 4 Posters 5.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Olivier ThomasO
      Olivier Thomas
      last edited by

      from ## to ##
      [2-4] [22-24] [32-34] [42-44] [52-54] … [92-94] [102-104] [122-124] [132-134] … [202-204] [222-224] [232-234] …

      I made such a pattern
      (\d*[2-9]|(\d+0)*)[2-4]
      what would you improve on this?

      PeterJonesP 1 Reply Last reply Reply Quote -1
      • PeterJonesP
        PeterJones @Olivier Thomas
        last edited by

        @Olivier-Thomas ,

        If it works for you, use it. We have given you enough that you can accomplish this task.

        We have pointed you to the official regex documentation for Notepad++, and the FAQ in this forum gives lots of other sites that have other regex help.

        You seem to have enough regex experience to be able to delve into other regex syntax yourself.

        This is not a generic regex help desk. And this is especially not a we-write-all-your-regex-for-you forum.

        1 Reply Last reply Reply Quote 1
        • Olivier ThomasO
          Olivier Thomas
          last edited by Olivier Thomas

          Do you read what you write or do you think about it for a moment?
          For your information, this forum is for Notepad++, NOT a generic regex help forum.

          Is it prohibited to use Notepad to search for numbers in the text?
          You don’t answer the questions yourself.

          what would you improve on this?

          Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote -5
          • Alan KilbornA
            Alan Kilborn @Olivier Thomas
            last edited by

            @Olivier-Thomas

            Oh, boy…here we go…

            1 Reply Last reply Reply Quote 1
            • PeterJonesP
              PeterJones @Olivier Thomas
              last edited by PeterJones

              @Olivier-Thomas ,

              You are behaving exactly like @Pan-Jan (PJ) and @Thomas-2020 (T2) , and I am working from the assumption that you are, in fact, that individual.

              Is it prohibited to use Notepad to search for numbers in the text?

              No. But it’s rude to not try things yourself, first. And it’s rude to abuse this forum to make us do your work for you.

              You don’t answer the questions yourself.

              Stop lying. I have given you and PJ and T2 so many answers it’s ridiculous.

              what would you improve on this?

              If it worked for me, I would do nothing to improve on it. If it didn’t work for me, I would debug it until it did.

              As with PJ and T2, I will not answer any more questions from @Olivier-Thomas until such time as he proves that he is willing to be a contributing , cooperative, non-demanding member of the community rather than an annoying vampire

              1 Reply Last reply Reply Quote 3
              • Olivier ThomasO
                Olivier Thomas
                last edited by Olivier Thomas

                But it’s rude to not try things yourself, first
                Where do you get that confidence?

                I wrote the pattern.
                I asked what would you change?
                You did not answer.

                Here nobody asked you and you corrected the pattern.

                @astrosofista , thanks for that. In the 50 invalid character classes in the original group,
                I didn’t notice that 10-21 was different than all the other groups.

                I would simplify yours (\d*[5-9]|\d+[01]|\d*1[2-4])\b*

                I don’t think you like people outside your clan.

                PeterJonesP 1 Reply Last reply Reply Quote -3
                • PeterJonesP
                  PeterJones @Olivier Thomas
                  last edited by PeterJones

                  @Olivier-Thomas said in Very long pattern:

                  I asked what would you change?
                  You did not answer.

                  The first time you asked, I told you to use what you had if it worked. The second time, I told you I would not change anything. I did answer.

                  Here nobody asked you and you corrected the pattern.

                  I didn’t correct it. I simplified it. As part of the flow of conversation. And I am sure @astrosofista was not upset that I did so. And if I did upset him, he is quite capable of letting me know.

                  I don’t think you like people outside your clan.

                  Wow! Ad hominem attacks are frowned upon (and usually forbidden) in every forum I’ve been a part of.

                  What I don’t like is behavior like yours or T2 or PJ, who come here, ask us to write their regexes for them, then change the rules and ask us to rewrite them, and keep doing that, and who treat this forum like their personal regex writing tool.

                  If the regex works for you, use it. If it doesn’t, debug it. If you have questions that are specific to Notepad++'s implementation, ask away. If you want generic regex help, find a regex forum (this isn’t it).

                  astrosofistaA 1 Reply Last reply Reply Quote 2
                  • Olivier ThomasO
                    Olivier Thomas
                    last edited by

                    @PeterJones said in Very long pattern:

                    vampire

                    Why are you provoking?
                    Do you want to show I’m a vampire or a troll?
                    You sit in the virtual world too much (possibly playing) and start to lose touch with the real world.
                    I am not a priest, but I believe people should be brothers, not enemies.
                    Think about it before it’s too late.

                    PeterJonesP 1 Reply Last reply Reply Quote -1
                    • PeterJonesP
                      PeterJones @Olivier Thomas
                      last edited by

                      @Olivier-Thomas ,

                      I am sorry I overreacted; I am sorry if I offended, though that was not my intention. I did my best to provide answers to your questions as long as I thought they were still relevant to Notepad++. When you posted a screenshot of a tool that didn’t appear to be Notepad++, I called you out on it, because we aren’t here for generic regex questions.

                      We recently had another user who was asking regex questions, and then complaining that those didn’t work in some non-Notepad++ tool and demanding that we re-write them in alternate syntax that would work in the non-Notepad++ tool. I was getting the impression that you were trying to do the same, so my frustration came through. For that, I am sorry.

                      Back to our regularly-scheduled Notepad++ discussion.

                      1 Reply Last reply Reply Quote 2
                      • astrosofistaA
                        astrosofista @PeterJones
                        last edited by

                        @PeterJones said in Very long pattern:

                        I didn’t correct it. I simplified it. As part of the flow of conversation. And I am sure @astrosofista was not upset that I did so. And if I did upset him, he is quite capable of letting me know.

                        Hi @PeterJones,

                        Of course, I’m not upset at all, even I upvoted your contribution, which as mine I think it was a collaborative effort to improve the responses that each one, individually, can offer.

                        Have fun!

                        1 Reply Last reply Reply Quote 0
                        • Olivier ThomasO
                          Olivier Thomas
                          last edited by

                          @astrosofista said in Very long pattern:

                          even I upvoted your contribution

                          I wish he had done it for me even though I asked him about it.
                          he just wrote like this:
                          If it works for you, use it. We have given you enough that you can accomplish this task.

                          ((\d*[5-9]|\d+[01])\b)|([1-9]?1[2-4]\b)
                          Was it not working?

                          @PeterJones
                          Maybe we’ll bury the war ax and smoke the peace pipe?

                          If you have any questions, I will be happy to answer.

                          1 Reply Last reply Reply Quote -2
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors