- preg_match: documentation ( source)
- trim: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$t = 'toto tutu 1.3 tdfs fdsfds fdsfsd';
preg_match('/^[^0-9]+/', $t, $matches);
echo trim($matches[0]);
echo date('Y-m', strtotime('1/99'));