If You Do It Differently, Document It Clearly
People get used to established standards. Even bad ones. If you come up with something better, make sure to explain it clearly, or brace yourself for lots of complaints you’re not following the old ways.
People get used to established standards. Even bad ones. If you come up with something better, make sure to explain it clearly, or brace yourself for lots of complaints you’re not following the old ways.
Being overly strict about what input your program or web site accepts makes it hard to use. Being overly lax causes compatibility headaches with future versions.
Recap of 4 articles on regular expressions pitfalls I previously posted to www.regular-expressions.info
Example regular expressions to check if a series of digits looks like a valid credit card number for any of the major brands.
It’s easier to use a trivial regex to strip out spaces and dashes from credit card numbers than to blame the customer for typing them in.