Remove every row with a number less than 1000 up to the first delimiter
-
@Eric-Tilley said in Remove every row with a number less than 1000 up to the first delimiter:
Im trying to remove every row with a number less than 1000 up to the first delimiter
I cans see there is now a small change to your request. It now appears you are ONLY wanting to test the first number, correct?
Thanks for inserting examples inside the black box, it makes it far easier for us (helping) to copy and use that in our testing phase before supplying a solution.
You will see I have linked your old post here. this is helpful for any readers who follow later on so they can understand the processes that went on.
Terry
-
Yes, only the first numbers up to the first delimiter.
-
@Eric-Tilley said in Remove every row with a number less than 1000 up to the first delimiter:
Im trying to remove every row with a number less than 1000 up to the first delimiter
I have gone with the method of “marking” the rows to be removed. The benefit of this is that you can see which ones are “marked” before taking the step to remove them. This is beneficial if concerned that the wrong rows are being deleted.
So using the “Mark” function we have
Find What:(?-s)^(\d){1,3}(?!\d)
Make sure “bookmark line” is ticked AND “regular expression” (under search mode) is also ticked.
Click on “Mark All” and you will see every row with the first number below 1000 will have a blue circle in the left margin. Pressing “F2” or “Shift-F2” allows you to move forwards (or backwards) through the marked lines. Once you are happy that the marking is correct click on “Remove Bookmarked Lines” which is under Search, Bookmark, that removes those rows.Terry
-
That worked great! Thank you so much.
-
@Terry-R said in Remove every row with a number less than 1000 up to the first delimiter:
…happy that the marking is correct click on “Remove Bookmarked Lines” which is under Search, Bookmark, that removes those rows.
A quicker way to get this menu to appear is to click in the margin that contains the purple ball bookmarks, like so after the right-click:
Note the right-click point was after the
9
of line 9, directly between the two bookmark symbols. If you squint you can see that this margin is a slightly different shade of grey than the line number margin. -
@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]+
.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
-
@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 -
Purple
Blue!
Neither!
RGB(25 66 191) at the dark edge
RGB(141 159 226) at the bright spot;-)
-
@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.
-
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 numbers6603
and5194
, 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
andlight_sapphire_blue
;-)Anyway, don’t forget that, on average,
8.3 %
of the mondial population is color blind, so… !Best regards,
guy038
-
Somehow I just knew that @guy038 was going to weigh in on the topic of colors… :-)
-
@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 -
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. -
@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-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.
-
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 of50 % × 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 ( about16
times more ! )BR
guy038