No One-on-One Advice
I’m sorry, but this blog really isn’t a place for personal advice on regular expressions. Suggestions for topics that I should write about are very welcome.
I’m sorry, but this blog really isn’t a place for personal advice on regular expressions. Suggestions for topics that I should write about are very welcome.
PHP’s preg_replace_callback() function allows you to do a search-and-replace using a dynamically generated replacement text which can be different for each regex match.
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.