27

When developers can't use Regex:

'Your credit card number cannot contain spaces'

ಠ_ಠ

Comments
  • 2
    doesn't even need regex, most languages have some simple character replace function, that's all it takes to make it easy to enter long numbers... damn lazy programmes
  • 0
    @ThomasRedstone Indeed. Who hasn't written a simple cleaning function when they started out?
  • 1
    @LMCodes who even needs a function?
    In PHP this will mostly do the trick:

    filter_var ( '1234-3111-8654-1234', FILTER_SANITIZE_NUMBER_INT);
  • 0
    @ThomasRedstone That's pretty tasty, learn something new every day.
  • 1
    With over 5000 built in functions, who could stand a chance of knowing them all?! :-)

    http://stackoverflow.com/questions/...
  • 0
    @ThomasRedstone pretty much, almost every time I've gone "I wonder if there is an easier way..." there seems to be a function!
Add Comment