fork download
  1. <?php
  2.  
  3. $str = '01 Растениеводство и животноводство 01.01
  4. 01.11.33 Растениеводство и животноводство 01.01
  5. 01.11.33.44 Растениеводство и 11 животноводство 01.01';
  6.  
  7. preg_match_all('/^([\d\.]+)/m', $str, $matches, PREG_SET_ORDER, 0);
  8.  
  9. // Print the entire match result
  10. print_r($matches);
Success #stdin #stdout 0.03s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => 01
            [1] => 01
        )

    [1] => Array
        (
            [0] => 01.11.33
            [1] => 01.11.33
        )

    [2] => Array
        (
            [0] => 01.11.33.44
            [1] => 01.11.33.44
        )

)