Community
    • Login

    Remove every row with a number less than 1000 up to the first delimiter

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    17 Posts 7 Posters 4.1k 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.
    • Terry RT
      Terry R
      last edited by Terry R

      @Eric-Tilley said in Remove every row with a number less than 1000 up to the first delimiter:

      Unfortunately, this did not produce the output I desired, and I’m not sure why. Could you please help me understand what went wrong

      I had a look at your solution and realised you made the mistake of using “meta-characters” where they don’t apply. I suggest reading the online manual for allowed “extended search” characters here. The [ and ] mean exactly that in extended mode, when used in “regular expression” mode they refer to a set that is contained within. And there was your second problem, each of the characters except for the - are tested individually. So in essence your set was numbers 1-9 (usually use 0-9), the 2 extra 9’s following were just a duplication of the preceding 9.

      So your expression said find as many numbers which are using ONLY 1-9 (excludes the 0) together. See my example below to see what results in. The same result occurs when using [1-9]+.

      b1164fa0-ee4a-4f97-b0d6-4b40faeb0da1-image.png

      I think you will find a mine of information if you go through the FAQ section of this forum. Specifically the regular expression detail in the post here.

      Good on you for trying, we like to see someone who has at least attempted to find a solution before asking here. Many however think we are a free bus service, hop-on and off at will, and seem reluctant to learn anything.

      Terry

      1 Reply Last reply Reply Quote 3
      • Terry RT
        Terry R @Alan Kilborn
        last edited by

        @Alan-Kilborn said in Remove every row with a number less than 1000 up to the first delimiter:

        the purple ball bookmarks

        You say purple, I say blue!

        Who is right? Of course if we get a “female” to intercede it’s likely to be “deep-sea-blue”, or “sky-purple”. Most men deal in 16 colours. Those old enough would remmebr the good old days when Windows 1.x provided 16 colour renditions of the GUI, WOW!

        cheers Alan ;-}}
        Terry

        PeterJonesP Alan KilbornA Neil SchipperN 3 Replies Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @Terry R
          last edited by

          @Terry-R

          Purple

          Blue!

          Neither!

          RGB(25 66 191) at the dark edge
          RGB(141 159 226) at the bright spot

          ;-)

          1 Reply Last reply Reply Quote 3
          • Alan KilbornA
            Alan Kilborn @Terry R
            last edited by

            @Terry-R said in Remove every row with a number less than 1000 up to the first delimiter:

            You say purple, I say blue!
            Who is right?

            Well… the color of the ball (or is it a circle or a sphere, Terry? :-) ) is not uniform throughout its area, so I’m sure we’re both right and there are some definite blue pixels and some definite purple pixels – I’m not going to examine pixels but “blue” or “purple” might be arbitrated by comparison with website data that gives colors a name. Don’t laugh, colors get the scientific treatment just like everything else.

            1 Reply Last reply Reply Quote 2
            • guy038G
              guy038
              last edited by

              Hello, @eric-tilley, @terry-r, @peterjones, @alan-kilborn and All,

              A bit, off topic but …

              From this site :

              http://mkweb.bcgsc.ca/colornames/color.names.txt

              containing a list of 9,284 colors, taken from many sources ( Color-hexa, Crayola, Pantone, Resene, rgb.txt, Wikipedia, xkcd and few others ) and with the help of some regexes, I was able to determine that the colors provided by Peter, relative to the bookmark indicator, are quite similar to the two colors below :

              Dark edge of boomarks ( from Peter)           |  025  066  191
              
                     |  Index 6603  |  persian_blue         |  028  057  187  |  #1C39BB  |
              
              Bright spot of bookmarks ( from Peter )       |  141  159  226
              
                     |  Index 5194  |  light_sapphire_blue  |  139  162  231  |  #8BA2E7  |
              

              In your browser, press Ctrl + F to perform a search and enter the index numbers 6603 and 5194, followed with a space char => You should move to the corresponding color. Of course, all these color’s names seem quite subjective, excepted the well-known main colors !

              In my opinion, the N++ bookmark’s color seems more blue than purple or even turquoise, as suggested by the two names persian_blue and light_sapphire_blue ;-)

              Anyway, don’t forget that, on average, 8.3 % of the mondial population is color blind, so… !

              Best regards,

              guy038

              Alan KilbornA artie-finkelsteinA 2 Replies Last reply Reply Quote 4
              • Alan KilbornA
                Alan Kilborn @guy038
                last edited by

                Somehow I just knew that @guy038 was going to weigh in on the topic of colors… :-)

                1 Reply Last reply Reply Quote 2
                • Terry RT
                  Terry R
                  last edited by

                  @Alan-Kilborn said in Remove every row with a number less than 1000 up to the first delimiter:

                  Somehow I just knew that @guy038 was going to weigh in on the topic of colors… :-)

                  I’m not knocking it, he’s just backed me up! BLUE wins! So Alan, now you HAVE to say blue circle/ball/sphere.

                  Cheers @guy038
                  Terry

                  1 Reply Last reply Reply Quote 1
                  • artie-finkelsteinA
                    artie-finkelstein @guy038
                    last edited by

                    When an ‘authoritative source’ ( @guy038 ) refers to another ‘authoritative source’ that in turn refers to xkcd as a source; you know that’s a well researched response. <grin> Guy, thank you, you made my day. And to top it all off, color.names.txt is a pretty cool reference to have on hand.

                    trigger warning: potential to confuse attempted humorous sarcasm with garden variety snark—
                    Note: I may have to take back some of my praise after I finally crawl back out of the seemingly bottomless hole of fascinating and unique information referenced on Mr. Krzywinski’s web site. Oh, the dangers of wandering outside one’s silo; education may be possible.

                    1 Reply Last reply Reply Quote 0
                    • Neil SchipperN
                      Neil Schipper @Terry R
                      last edited by Neil Schipper

                      @Terry-R said in Remove every row with a number less than 1000 up to the first delimiter:

                      Of course if we get a “female” to intercede it’s likely to be “deep-sea-blue”, or “sky-purple”. Most men deal in 16 colours.

                      @guy038 said in Remove every row with a number less than 1000 up to the first delimiter:

                      don’t forget that, on average, 8.3 % of the mondial population is color blind, so… !

                      Internet tells me:

                      Color blindness (color vision deficiency, or CVD) affects approximately 1 in 12 men (8%) and 1 in 200 women in the world

                      So a random pair of women, compared to a random pair of men, are more than 10x likely to agree with obervations like “color X differs from color Y” in many cases. It makes sense that among women, more fine-grained descriptive terms would emerge that are sensible to them.

                      This is a nice instance of: “what was once a cultural trope is now a scientifically validated claim”.

                      Neil SchipperN 1 Reply Last reply Reply Quote 1
                      • Neil SchipperN
                        Neil Schipper @Neil Schipper
                        last edited by

                        @Neil-Schipper said in Remove every row with a number less than 1000 up to the first delimiter:

                        are more than 10x likely to agree

                        That’s ridiculous, you.

                        are less then a tenth as likely to disagree

                        Better.

                        1 Reply Last reply Reply Quote 1
                        • guy038G
                          guy038
                          last edited by

                          Hello @neil-schipper,

                          You quoted :

                          Color blindness (color vision deficiency, or CVD) affects approximately 1 in 12 men (8%) and 1 in 200 women in the world

                          So my proportion of 8.3 % was not correct. Giving your statement, this leads to a real proportion of 50 % × 1 ÷ 12 + 50 % × 1 ÷ 200. So the proportion of color-blind people, among the world population, is rather ≈ 4.4 %, with a clear proportion in men compared to women ( about 16 times more ! )

                          BR

                          guy038

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