Featured article image

Fu**ing numeric ranges in regex

A question I hear quite frequently is, how do you match a number within a range in a regular expression? This is a pretty odd question, since regular expressions tend to deal with strings without worrying about the meaning of their content. Most of the time it turns out the person asking is trying to do all of their input validation using regular expressions, which I believe is a singularly bad idea.