<?php /* входящие данные 24.2.1989 18.12 */ preg_match('/(\d{1,2})\.(\d{1,2})\.?(\d{4})?/', $inputData, $matches); $birthdate = $matches[3] . '-' . $matches[2] . '-' . $matches[1]; the condition works, but skips an unlimited number of characters: 18.12,,,,,,,,,,,,,,,,
^to the beginning of the regular season, and$at the end is mymedia45.99.0001- terancheckdate()- teran