fork(1) download
  1. <?php
  2.  
  3. $str = '/текст/текст текст/нетекст/текст';
  4.  
  5. list($a, $b) = preg_split('/(?=\/[^\/]+$)/', $str);
  6.  
  7. var_dump($a, $b);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
string(48) "/текст/текст текст/нетекст"
string(11) "/текст"