You're viewing a comment by Peter Stuifzand and its responses.

November 10, 2011, 11:56

I created a oneliner that checks for point 119 how many numbers it matches between 0 and 255. This number should be 256, but its not.

perl -E 'for (0..255) { $count+=m/^(([0-9])|([0-9][0-9])|([12][0-5][0-5]))$/}END{say$count}'

Comment Responses

November 10, 2011, 12:03

I was confident it was right. I never checked it, I only trusted my reasoning. Now it will be interesting to find where I went wrong.

Edit: Aha, 106 - 109, 116 - 119, ..., 156 - 199 don't get matched, and 206-209, 216-219, 226-229, 236-239, 246-249.

Here is the fix:


Matches 0-9 or 10-99 or 100-199 or 200-249 or 250-255.

Here is the original, broken one that I had:

August 11, 2014, 17:52

I really love your blog.I wanted to thank you for this great read!! I definitely enjoying each and every little bit of the article and I have you bookmarked your site to check out new stuff you post.

independence day images.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.