You're viewing a comment by Eric TF Bat and its responses.

Eric TF Bat Permalink
November 10, 2011, 12:04

Adding to my previous comment: if you want to allow redundant zeroes, which your regexp does partially, change mine to


That's: 0-9, 00-99, 00-09, 000-099, 10-19, 100-199 for the first alternative, then 200-249 for the second and 250-255 for the third as before. It's redundant, but that doesn't matter.

Easier would be combining regexps with a little binary/boolean algebra, but that's straying outside the purity of the topic...

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "coding_277": (just to make sure you're a human)

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