10 000 RUB 12 000 RUB
preg_replace('/[^\d]/', ", $string);
Related questions
preg_replace('/^([\s\d]+).*/is', '$1', $str);
preg_replace('/\s+/', ", $str);
preg_replace('/^(\d+)\s(\d+).*/s', '$1$2', $str);
Find more questions by tags PHP