L
L
lokubicuv2016-10-26 22:02:19
PHP
lokubicuv, 2016-10-26 22:02:19

How to make a regular program that checks the date of birth of a user from VK?

VK through its api can give such dates of birth: 11.3 (March 11), and 11.3.1994. How can I write a regular expression in PHP so that it checks if it is complete?
scheme: number from 1 to 31[dot] number from 1 to 12[dot]4 digits

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-10-26
@lokubicuv

Why regular? Isn't it easier to just check the length of the string? If it is greater than 5 (4 numbers and a dot), then the date is complete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question